0
|
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 }
|