NHibernate QueryOver restrict by string length -
how restrict query length of string property? eg. like:
nhsession.queryover<customer>() .where(p => p.registrycode.length == 8)
something may trick
nhsession.queryover<customer>() .where( restrictions.eq( projections.sqlfunction("length", nhibernateutil.string, projections.property<customer>(x => x.registrycode)), 8 ) )
Comments
Post a Comment