Archive for September, 2012

Using LIKE with LINQ to NHibernate in C#

NHibernate Benjamin Perkins

The equivalent to LIKE via the LINQ to NHibernate provider is Contains. An example of a LINQ to NHibernate that will return a result set matching a search like parameter is below. IQueryable<Classname> linqLIKE =         (from m in session.Query<Classname>()          where m.Code.Contains(“%dex%”)          orderby m.CreateDate          select m); IList<Classname> ListLIKE = linqLIKE.ToList(); The above […]

Read More →