linq-to-nhibernate Questions
4
Solved
I am using Fluent NHibernate for my ORM. In doing so I am trying to use the NHibernate LINQ syntax to fetch a set of data with the power of LINQ. The code I have works and executes correctly with t...
Kepner asked 16/10, 2012 at 16:33
3
I love NHibernate (and NHibernate.Linq). I don't prematurely optimize, but sometimes I'll hit a really nasty N+1 issue. The recommended fix for the N+1 is to use NH's Fetch extension method.
The ...
Foreland asked 22/10, 2015 at 16:43
3
Solved
Using FNH, i am trying to retrieve categories, using the following:
_session.QueryOver<Data.Model.Category>()
.Where(c => tourCreateRequest.Categories.Contains(c.CategoryId))
.List()
....
Lynelllynelle asked 7/4, 2013 at 13:14
5
Solved
I have an entity and its mapping:
public class Test
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
}
public clas...
Frustum asked 8/4, 2010 at 7:24
5
Solved
The new version of C# is there, with the useful new feature Tuple Types:
public IQueryable<T> Query<T>();
public (int id, string name) GetSomeInfo() {
var obj = Query<SomeType>...
Subrogation asked 13/4, 2017 at 19:16
5
Solved
I am playing with FluentNHibernate and NH 3.0, using the LINQ provider and the new QueryOver syntax.
Now with QueryOver I want to get an item (called result) with a timestamp value as close as po...
Ly asked 29/12, 2010 at 13:23
1
I'm having an issue with NHibernate 3.3.3 against SQL Server using NVARCHAR as a parameter against a VARCHAR column for LIKE queries created from a string.Contains() function in a LINQ expression. ...
Afghanistan asked 27/8, 2014 at 11:19
3
Solved
I'm having trouble ordering by more than one field in my Linq to NHibernate query. Does anyone either know what might be wrong or if there is a work around?
Code:
IQueryable<AgendaItem> ite...
Rube asked 13/9, 2008 at 19:55
2
Could you please let me know what is the exact deference between deferred execution and Lazy evaluation in C#?These two are used synonymously.Could some one please explain the difference with an ex...
Eleusis asked 27/3, 2010 at 20:8
5
Solved
One way to increase scalability of the server application is to run IO-bound operation (reading files, sockets, web requests, database requests etc) asynchronously. This does not mean run them in t...
Isauraisbel asked 21/3, 2010 at 4:41
7
Solved
The problem: Nhibernate parses each value in the "WHERE IN()" sql as parameters and MS SQL server doesn't support enough parameters (over 2000).
I am using Nhibernate with Linq to retrive my data ...
Thromboplastic asked 9/6, 2011 at 13:16
3
Solved
To keep my integration tests independent I remove all old data and insert new test data before each test. Is there a better way of doing this than simply querying for all entities and deleting them...
Thorstein asked 29/1, 2009 at 9:4
2
I have two classes (Request & RequestDetail). I need to a Linq To NHibernatequery between two classes by join.
var q = SessionInstance.Query<Request>()
.Where(x => x.State == "Init")...
Reformed asked 15/11, 2012 at 9:39
2
I found 2 similar questions:
Multiple Fetches in linq to nhibernate
Is this the right way of using ThenFetch() to load multiple collections?
According to this page:
Be careful not to eagerly...
Cudgel asked 28/4, 2011 at 6:13
4
Solved
How can I produce this query using NHibernate.Linq?
WHERE this_.Name LIKE @p0; @p0 = 'test' // Notice NO % wild card
Note, this is not Linq To Sql or Entity Framework. This is NHibernate.
Edit:...
Sharlasharleen asked 6/11, 2009 at 19:8
4
Solved
I have a statement like so:
var vals =
from StandAloneUserPayment saup in _Session.Query<StandAloneUserPayment>()
.Fetch(x => x.RecurringPayments)
where
saup.User.UserId == userId
&a...
Righthanded asked 10/9, 2012 at 0:3
4
Solved
I am trying to build up an expression that will be applied to an IQueryable collection.
I can build an expression like this:
[TestClass]
public class ExpressionTests
{
private IQueryable<MyEn...
Lawana asked 28/7, 2011 at 6:11
1
Solved
When using:
.OrderByDescending(review => review.Country.Id == reviewCountryID)
the SQL query is generated correctly and no error is thrown.
When using:
.OrderByDescending(review =>
revi...
Hygrograph asked 14/8, 2015 at 10:28
3
Solved
Having NHibernate entities:
Company, Invoice and InvoiceLine which has a decimal property Price.
A Company has a collection of type Invoice, and an Invoice has a collection of type InvoiceLine.
...
Pseudohermaphrodite asked 8/8, 2013 at 8:45
3
Solved
Is it possible to get Nhibernate linq to generate a query with an "In" clause? e.g. - Where AnID in (x,y,z)?
Glyptograph asked 30/3, 2010 at 16:34
4
Solved
I'm using a generic repository that exposes an IQueryable<T> like this:
public IQueryable<T> AllEntities
{
get
{
return session.Query<T>();
}
}
I can query like this:
var ...
Nobell asked 26/1, 2011 at 20:58
4
I'm trying to load all the collections eagerly, using NHibernate 3 alpha 1. I'm wondering if this the right way of using ThenFetch()?
Properties with plural names are collections. The others are j...
Hospitalization asked 3/8, 2010 at 15:18
3
Solved
I have a query like this
var orderedQueryable = this.participationRequests
.Fetch(x => x.CommunityEvent)
.Fetch(x => x.CommunityMember)
.ThenFetch(x => x.User)
.Where(x => x.Commu...
Cedillo asked 16/11, 2011 at 13:17
1
Solved
Using NHibernate 3.3.1.400, I'm having problems expressing what is a simple SQL statment using NHibernate's Linq provider.
My domain model looks like this:
public class Site
{
public virtual Gui...
Sear asked 13/1, 2014 at 22:56
1
can anyone help me figure out what I'm doing wrong. I'm new to nhibernate and I'm finding it quite hard to really get comfortable with it. I have this query:
var results2 = (from purchase in _ses...
Fluorocarbon asked 10/1, 2011 at 22:4
1 Next >
© 2022 - 2024 — McMap. All rights reserved.