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 Articles
- Extending LINQ to Nhibernate provider, in combination with Dynamic LINQ problem
- LINQ Source Code Available
- NHibernate 3 - extending Linq provider BaseHqlGeneratorForMethod.BuildHql problem
- Nhibernate and linq problem
- NHibernate 3.1 migration problem with Linq
- creating Linq to sqlite dbml from DbLinq source code
- 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
- nhibernate activerecord linq Contains problem
- source code for LINQ 101 samples
- Linq to NHibernate - select count problem
- Linq Scope Problem + Reduce Repeated Code
- c# Linq or code to extract groups from a single list of source data
- Convert string[] to int[] in one line of code using LINQ
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- NHibernate vs LINQ to SQL
- Linq code to select one item
- Fetch vs FetchMany in NHibernate Linq provider
- How are people unit testing code that uses Linq to SQL
- Problem with LINQ to Entities and String.StartsWith
- Linq for NHibernate and fetch mode of eager loading
- Tradeoffs using NHibernate 3.0 QueryOver or LINQ provider
- Problem with linq query
- Nhibernate Linq In Clause
- LINQ query to perform a projection, skipping or wrapping exceptions where source throws on IEnumerable.GetNext()
- Getting count with NHibernate + Linq + Future
- NHibernate Second Level Cache With NHibernate Linq Provider 1.0
- Nhibernate 3 & LINQ
- How to do a case-insensitive string where in NHibernate Linq query?
- Join an array of string with the result of an existing linq statement
- How many Include I can use on ObjectSet in EntityFramework to retain performance?
- Inverse of OfType in Linq?
- Check if one IEnumerable contains all elements of another IEnumerable
- After simple Linq-Foreach List is null
- Linq retrive the parent object
- C# SQL query blocks server memory
- C# Query XML with Linq to find match
- Insert data into database using LINQ
- LINQ - How to change value in select or foreach loop?
- Entity Framework include children that grand children are null
- generic method to get linq result to datatable for select new with multiple selects
- GroupBy method into C# based on SQL query
- How to get Date Month and Year Number using dataSet.Tables query
- How to write a linq query for this data structure
- EntityFramework6 - Error 42703: column Extent1... not found
- LINQ Query to Return multiple results
- having and conditional count() in linq query
- Linq Sql Query Error for Get value
- Order by date and convert to string In list