asp.net mvc - Is it possible use the like command in queryover nHibernate? How can I do this? -


i want search through parts of record, not in accurate records. in exemple search accurate records:

var v = nhsession.queryover<dados.models.personmodel>()             .where(w=>w.name == "mary"))             .list(); 

i can queryover or criteria?

the answer in the: whererestrictionon. this

var v = nhsession     .queryover<dados.models.personmodel>()     //.where(w => w.name == "mary"))     .whererestrictionon(w => w.name)       .islike("mary", matchmode.start);     .list(); 

the matchmode enum decide put '%' generated sql statement


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -