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 1912 dni, 1 minutę temu nocturn 88 pokaż kod licznika zwiń

Wczytywanie artykułów...
DAC2019baner
Sklep z gadzetami

Najaktywniejsi

1
(32 891,59)
2
(32 816,53)
3
(27 178,29)
4
(21 178,88)
5
(20 336,33)
6
(13 018,14)
7
(10 512,28)
8
(9 775,28)
9
(8 388,27)
10
(6 822,96)
11
(6 214,22)
12
(5 393,84)
13
(4 127,41)
14
(4 026,73)
15
(3 863,06)
16
(3 599,54)
17
(3 448,35)
18
(3 318,39)
19
(3 224,66)
20
(3 105,41)