score:0
Accepted answer
Apologies. I was using QueryOver
on the Get
method in the Repository and Query
for everything else. It works when I switched to Query
.
score:1
What if you called .Expand()
on your IQueryable
first?
So, assuming you had a session, it might look like this:
var senders =
(from sender in session.Query<Sender>().Expand("User")
where sender.User.Email == fromAddress
select sender);
Unfortunately that requires you to import an NHibernate extension method.
Source: stackoverflow.com
Related Query
- Nhibernate and linq problem
- Problem with LINQ to Entities and String.StartsWith
- Linq for NHibernate and fetch mode of eager loading
- Enumerable.Empty<T>().AsQueryable(); This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code
- NHibernate Linq provider and take() skip() with eager fetching
- NHibernate 3.x deletes child entities when combining LINQ paging, many-to-many, and subselect fetch
- NHibernate 3.1 Linq with Contains and Any
- Extending LINQ to Nhibernate provider, in combination with Dynamic LINQ problem
- LINQ to NHibernate and let keyword
- LINQ Source Code Available
- Refactor Linq code and "LINQ to Entities does not recognize the method"
- How can I code an outer join using LINQ and EF6?
- NHibernate Linq and DistinctRootEntity
- NHibernate 3 - extending Linq provider BaseHqlGeneratorForMethod.BuildHql problem
- C# - Linq optimize code with List and Where clause
- IEqualityComparer and Linq Distinct - Hard Code GetHashCode()
- EF Code first Eager loading and OrderBy problem
- How linq to nhibernate by join and Separate where in query
- NHibernate 3 and LINQ support?
- NHibernate 3.1 migration problem with Linq
- creating Linq to sqlite dbml from DbLinq source code
- Stubbing Code for Test With Linq Expressions and Lambdas
- Linq to NHibernate and Dynamic LINQ - query caching not working
- NHibernate LINQ query performance, which code fragment is better?
- Linq to sql as object data source - designer problem with partial classes
- subquery Problem in Linq To Nhibernate
- SQL subquery result in LINQ and Entity Framework Code First
- Problem with LINQ to XML and Namespaces
- NHibernate LINQ Where and Any throwing exception
- Code Rewite for tuple and if else statements by using LINQ
More Query from same tag
- linq select C# to vb.net
- How to identify if two List<string> are equal regardless of the order?
- Linq query to order list by occurences of foreign key in another list
- Referencing object's identity before submitting changes in LINQ
- Error using a subset of fields in Entity Framework
- After retrieving data from a table, I am trying to condense a list of dictionaries to unique key values for "platform" with sum of "global sales"
- Property type for the result of a group by
- Refactoring for-loop Linq query into a single query
- Is there a "not equal" in a linq join
- How can I set the value of a parameter inside of an object?
- C# foreach doesn't modify properties of elements when iterating over collection created by linq .Select()
- entity framework linq include and grouping
- Reusing EF Core Projection Function in Another Function with Arguments
- Filter generic list with generic dictionary
- Is there a cleaner/simpler way of doing an equivalent of WHERE a IN (aa, bb, cc)?
- Return only certain columns to JSON in LINQ
- Does using AsNoTracking() make a difference when only returning fields?
- What happens when ==, CompareTo(), and Equals() do not agree?
- Querying on Azure table storage doesnt work beyond a certain number of entities?
- Separating concerns with Linq To SQL and DTO's
- Get latest record from a grouping and filter on status
- Numbers of iteration generated in a single LINQ query
- Convert SQL query with INNER JOINs, GROUP BY, ORDER BY, and MAX() to LINQ
- How to query using a string in LINQ
- LINQ to NHibernate join - Query latest N per group - NotSupportedException
- LINQ to SQL: is there a complete list of supported IQueryable extension methods?
- Performing a date comparison with a date field stored in the database
- How to efficiently group all implementations by interface from multiple assemblies?
- Getting the key value paired differences in two data rows?
- C# Sum up values in Lists of List