Linq to NHibernate [closed]

笑着哭i 提交于 2019-11-26 09:16:53

问题


I have been looking around for some example projects or tutorials on Linq to Nhibernate.

Does anyone know of any good ones?


回答1:


How about this one: RhinoCommons, NHibernate and ASP.NET MVC Part 1 - Setup

And also this quick one: Linq to NHibernate Tutorial




回答2:


If you need the best samples on a project. You can look at the tests. You will have the most complete samples for every fields. (Only if the project is unit tested :))

look here for select samples: http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Linq/src/NHibernate.Linq.Tests/SelectionTests.cs?view=markup

And for the all test folder: http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Linq/src/NHibernate.Linq.Tests/

Hope this helps.




回答3:


Linq to NHibernate has not many differences from any other Linq provider, apart from not being complete or fully tested and stable.

When you import NHibernate.Linq you get an extension method .Linq() that returns a IQueryable that can be used like any other Linq collection, so from here, any good Linq tutorial or explanation can help you.

The most interesting thing that you get with Linq to NHibernate IMHO is deferred execution. That is that the database is hit when you really need the results.

Hope this helps.




回答4:


There's currently not a mature linq to nhibernate provider, so you've to wait till that's implemented I think before you can do anything beyond from x in .. where .. select...




回答5:


http://mhinze.com/linq-to-nhibernate-in-10-minutes/




回答6:


Here is one I have found. It talks about a few more technologies other than LINQ to NHibernate. But I still find it good. LINQ to NHibernate




回答7:


Try http://www.hookedonlinq.com/LINQToNHibernate.ashx. You might also want to look at this question: Linq to NHibernate project status? Contributing? Lead?




回答8:


Shameless plug:
http://emiajnet.blogspot.com/2009/04/fluent-nhibernate-and-linq2nhibernate.html
Hope this helps.




回答9:


Using Linq with NHibernate : A Quick Start



来源:https://stackoverflow.com/questions/624609/linq-to-nhibernate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!