Alex, I feel exactly the opposite! :-( I prefer having extension methods, I think the code is much more fluent. Also, there are already extension methods like this (cache, timeout, etc).
RP On Tuesday, August 19, 2014 6:24:54 AM UTC+1, cremor wrote: > > 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 nhibernate-development+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.