Mercurial > pub > bltoolkit
comparison HowTo/DataAccess/SelectByKeySql.cs @ 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 using System; | |
2 | |
3 using NUnit.Framework; | |
4 | |
5 using BLToolkit.Data; | |
6 using BLToolkit.DataAccess; | |
7 | |
8 namespace HowTo.DataAccess | |
9 { | |
10 [TestFixture] | |
11 public class SelectByKeySql | |
12 { | |
13 [Test] | |
14 public void Test1() | |
15 { | |
16 /*[a]*/SqlQuery<Person> query = new SqlQuery<Person>()/*[/a]*/; | |
17 | |
18 Person person = query./*[a]*/SelectByKey(1)/*[/a]*/; | |
19 | |
20 Assert.IsNotNull(person); | |
21 } | |
22 | |
23 [Test] | |
24 public void Test2() | |
25 { | |
26 using (DbManager db = new DbManager()) | |
27 { | |
28 /*[a]*/SqlQuery<Person> query = new SqlQuery<Person>()/*[/a]*/; | |
29 | |
30 Person person = query./*[a]*/SelectByKey(db, 1)/*[/a]*/; | |
31 | |
32 Assert.IsNotNull(person); | |
33 } | |
34 } | |
35 } | |
36 } | |
37 |