Monday, July 7, 2008

Small but interesting find

Yesterday I was coding and I needed to create a criteria like

....
Repository.FinOne(Restriccions.Eq("Email", email));
...

however I wanted to make sure that there was not prblems with caseing
it turns out IgnoreCase exists and can be used this way :D

Repository.FinOne(Restriccions.Eq("Email", email).IgnoreCase());

I was really happy to find this, thanks NHibernate in Action!

No comments: