Let's assume that we have a simple table GL_Task which looks like this I was asked to rewrite simple SQL query SELECT Id,Name,IdProject FROM GL_Task WHERE Name = 'First task' OR Id IN (3,4 /more id's to come/) using NHibernate's QueryOver API. As simple as it may seem, solution for this particular problem is not straightforward. My first (not so clever) attempt was simply combining WhereRestrictionOn and Where clause var result = session.QueryOver

Tagi: NHibernate, ORM
Dziel się z innymi:
[EN] .NET Blog: NHibernate - generating WHERE IN … OR … queries

Windows 3511 dni, 16 godzin, 58 minut temu nocturn 88 pokaż kod licznika zwiń

Wczytywanie artykułów...

Najaktywniejsi w tym miesiącu