comparison UnitTests/Linq/VisualBasicCommon.vb @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 Imports Data.Linq.Model
2
3 Public Module VisualBasicCommon
4
5 Public Function ParamenterName(ByVal db As ITestDataContext) As IEnumerable(Of Parent)
6 Dim id As Integer
7 id = 1
8 Return From p In db.Parent Where p.ParentID = id Select p
9 End Function
10
11 Public Function SearchCondition1(ByVal db As ITestDataContext) As IEnumerable(Of LinqDataTypes)
12 Return _
13 From t In db.Types _
14 Where Not t.BoolValue And (t.SmallIntValue = 5 Or t.SmallIntValue = 7 Or (t.SmallIntValue Or 2) = 10) _
15 Select t
16 End Function
17
18 Public Function SearchCondition2(ByVal db As NorthwindDB) As IEnumerable(Of String)
19 Return _
20 From cust In db.Customer _
21 Where cust.Orders.Count > 0 And cust.CompanyName.StartsWith("H") _
22 Select cust.CustomerID
23 End Function
24
25 End Module