Mercurial > pub > bltoolkit
comparison HowTo/DataAccess/Format.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 using System.Collections.Generic; | |
3 | |
4 using NUnit.Framework; | |
5 | |
6 using BLToolkit.DataAccess; | |
7 | |
8 namespace HowTo.DataAccess | |
9 { | |
10 [TestFixture] | |
11 public class Format | |
12 { | |
13 public abstract class PersonAccessor : DataAccessor | |
14 { | |
15 [SqlQuery("SELECT TOP {0} * FROM Person")] | |
16 public abstract List<Person> GetPersonList([/*[a]*/Format/*[/a]*/] int top); | |
17 } | |
18 | |
19 [Test] | |
20 public void Test() | |
21 { | |
22 PersonAccessor pa = DataAccessor.CreateInstance<PersonAccessor>(); | |
23 List<Person> list = pa.GetPersonList(2); | |
24 | |
25 Assert.That(list, Is.Not.Null); | |
26 Assert.That(list.Count, Is.LessThanOrEqualTo(2)); | |
27 } | |
28 } | |
29 } |