annotate UnitTests/Linq/VisualBasicCommon.vb @ 9:1e85f66cf767 default tip

update bltoolkit
author nickolay
date Thu, 05 Apr 2018 20:53:26 +0300
parents f990fcb411a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
1 Imports Data.Linq.Model
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
2
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
3 Public Module VisualBasicCommon
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
4
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
5 Public Function ParamenterName(ByVal db As ITestDataContext) As IEnumerable(Of Parent)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
6 Dim id As Integer
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
7 id = 1
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
8 Return From p In db.Parent Where p.ParentID = id Select p
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
9 End Function
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
10
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
11 Public Function SearchCondition1(ByVal db As ITestDataContext) As IEnumerable(Of LinqDataTypes)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
12 Return _
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
13 From t In db.Types _
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
14 Where Not t.BoolValue And (t.SmallIntValue = 5 Or t.SmallIntValue = 7 Or (t.SmallIntValue Or 2) = 10) _
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
15 Select t
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
16 End Function
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
17
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
18 Public Function SearchCondition2(ByVal db As NorthwindDB) As IEnumerable(Of String)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
19 Return _
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
20 From cust In db.Customer _
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
21 Where cust.Orders.Count > 0 And cust.CompanyName.StartsWith("H") _
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
22 Select cust.CustomerID
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
23 End Function
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
24
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
25 End Module