Mercurial > pub > bltoolkit
comparison HowTo/DataAccess/PrimaryKey.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.DataAccess; | |
6 using BLToolkit.Mapping; | |
7 | |
8 namespace HowTo.DataAccess | |
9 { | |
10 [TestFixture] | |
11 public class PrimaryKey | |
12 { | |
13 public class Person | |
14 { | |
15 [MapField("PersonID"), /*[a]*/PrimaryKey/*[/a]*/, NonUpdatable] | |
16 public int ID; | |
17 | |
18 public string LastName; | |
19 public string FirstName; | |
20 public string MiddleName; | |
21 } | |
22 | |
23 [Test] | |
24 public void Test() | |
25 { | |
26 SqlQuery<Person> da = new SqlQuery<Person>(); | |
27 | |
28 Person person = da./*[a]*/SelectByKey(1)/*[/a]*/; | |
29 | |
30 Assert.IsNotNull(person); | |
31 } | |
32 } | |
33 } | |
34 |