Mercurial > pub > bltoolkit
comparison HowTo/DataAccess/Insert.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 Insert | |
12 { | |
13 [Test] | |
14 public void Test1() | |
15 { | |
16 /*[a]*/SprocQuery<Person> query = new SprocQuery<Person>()/*[/a]*/; | |
17 | |
18 Person person = new Person(); | |
19 | |
20 person.FirstName = "Crazy"; | |
21 person.LastName = "Frog"; | |
22 person.Gender = Gender.Unknown; | |
23 | |
24 query./*[a]*/Insert(person)/*[/a]*/; | |
25 } | |
26 | |
27 [Test] | |
28 public void Test2() | |
29 { | |
30 using (DbManager db = new DbManager()) | |
31 { | |
32 /*[a]*/SprocQuery<Person> query = new SprocQuery<Person>()/*[/a]*/; | |
33 | |
34 Person person = new Person(); | |
35 | |
36 person.FirstName = "Crazy"; | |
37 person.LastName = "Frog"; | |
38 person.Gender = Gender.Other; | |
39 | |
40 query./*[a]*/Insert(db, person)/*[/a]*/; | |
41 } | |
42 } | |
43 } | |
44 } | |
45 |