0
|
1 using NUnit.Framework;
|
|
2
|
|
3 using BLToolkit.DataAccess;
|
|
4 using BLToolkit.Mapping;
|
|
5 /*[a]*/using BLToolkit.Reflection.Extension/*[/a]*/;
|
|
6
|
|
7 namespace HowTo.DataAccess
|
|
8 {
|
|
9 [TestFixture]
|
|
10 public class XmlExtension
|
|
11 {
|
|
12 public class MyPersonObject
|
|
13 {
|
|
14 [MapField("PersonID")]
|
|
15 public int ID;
|
|
16
|
|
17 public string LastName;
|
|
18 public string FirstName;
|
|
19 public string MiddleName;
|
|
20 }
|
|
21
|
|
22 [Test]
|
|
23 public void Test()
|
|
24 {
|
|
25 SqlQuery<MyPersonObject> query = new SqlQuery<MyPersonObject>();
|
|
26
|
|
27 /*[a]*/query.Extensions = TypeExtension.GetExtensions("XmlExtension.xml")/*[/a]*/;
|
|
28
|
|
29 MyPersonObject person = query.SelectByKey(1);
|
|
30
|
|
31 Assert.IsNotNull(person);
|
|
32 }
|
|
33 }
|
|
34 }
|
|
35
|