comparison HowTo/DataAccess/ParamName.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 NUnit.Framework;
3 using BLToolkit.DataAccess;
4
5 namespace HowTo.DataAccess
6 {
7 [TestFixture]
8 public class ParamName
9 {
10 public abstract class TestAccessor : DataAccessor
11 {
12 public abstract Person SelectByName(
13 [ParamName("FirstName")] string name1,
14 [ParamName("@LastName")] string name2);
15 }
16
17 [Test]
18 public void Test()
19 {
20 TestAccessor ta = DataAccessor.CreateInstance<TestAccessor>();
21 Person p = ta.SelectByName("Tester", "Testerson");
22
23 Assert.AreEqual(2, p.ID);
24 }
25 }
26 }