I have a linq query
var query = from record in session.Query<Record>()
from brwSet in session.Query<BorrowerSet>()
from brw in session.Query<Borrower>()
where
brw.PrintOrder == 1 && brwSet.PrintOrder == 0
&& record.Package.BorrowerSet.Contains( brwSet )
&& brwSet.Borrower.Contains( brw )
select new Summary()
{
BorrowerFirstName = brw.Contact.FirstName,
BorrowerLastName = brw.Contact.LastName,
LoanPackageID = record.Id
};
how could I rewrite this to eliminate the extra from clauses
from brwSet in session.Query<BorrowerSet>()
from brw in session.Query<Borrower>()
how can I rewrite this so I don't need the contains function on these collections?
record.Package.BorrowerSet.Contains( brwSet ) && brwSet.Borrower.Contains( brw )