Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
VB.Net: Simple queries in Linq To NHibernate
From Wiki
Given the following Class
- Public Class Person()
- Private FirstName as String
- Private LastName as String
- ...
- End Class
You can look for al Persons with LastName "Baes" like this
- Dim _Query = From e In _Session.Linq(Of Person)() Where e.LastName.Equals("Baes") Select e
- _Persons = _Query.ToList
this would be the same as writting the following in HQL.
- _Query = _Session.CreateQuery("FROM Person e Where e.LastName=:Name")
- _Query.SetString("Name","Baes")
- _TexCases = _Query.List(Of Person)()



LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.