Cremor, fetching methods are something different than proposed methods. And
EF has completely different API, names, meaning and behaviours of these
methods ("Fetch" in NH vs "Include" in EF; "AsReadOnly" proposed for NH vs.
"AsNoTracking" in EF), it does not have lock modes, etc.Best Regards, Alexander 2014-08-19 17:24 GMT+12:00 cremor <[email protected]>: > I'd stay as fluent as possible, so my vote is for option 3. But I still > like extension methods more. There are already extension methods for > fetching, so why create something different? > > And Entity Framework also does it with extension methods, so the API would > be similar for both frameworks. > > > > On Tuesday, August 19, 2014 5:23:10 AM UTC+2, Alexander Zaytsev wrote: >> >> Hi guy, >> >> There are some demand to add ability tune LINQ queries with different >> options, as readonly, lock modes, time outs, etc (NH-2285, NH-3470) >> >> All of them are about to add extension methods for IQueryable. I do not >> like this, and I have a proposal: >> >> What if we will have an argument on session.Query methods which will >> accept the query options: >> >> >> session.Query<Customer>(new QueryOptions { ReadOnly = true }).Where(c => >> /*...*/) >> >> or with lambdas >> >> session.Query<Customer>(c => { c.ReadOnly = true; }).Where(c => /*...*/) >> >> or >> >> session.Query<Customer>(c => c.ReadOnly()).Where(c => /*...*/) >> >> What do you think? >> >> Best Regards, >> Alexander >> > -- > > --- > You received this message because you are subscribed to the Google Groups > "nhibernate-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "nhibernate-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
