comparison HowTo/DataAccess/SqlQuery.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 SqlQuery
12 {
13 public abstract class TestAccessor : DataAccessor
14 {
15 [/*[a]*/SqlQuery/*[/a]*/(@"
16 SELECT
17 *
18 FROM
19 Person
20 WHERE
21 FirstName like @firstName AND
22 LastName like @lastName")]
23 public abstract List<Person> GetPersonListByName(string @firstName, string @lastName);
24 }
25
26 [Test]
27 public void Test()
28 {
29 TestAccessor ta = DataAccessor.CreateInstance<TestAccessor>();
30
31 List<Person> list = ta.GetPersonListByName("John", "P%");
32
33 Assert.AreNotEqual(0, list.Count);
34 }
35 }
36 }