0
|
1 using BLToolkit.Data.DataProvider;
|
|
2 using BLToolkit.Data.Sql.SqlProvider;
|
|
3
|
|
4 namespace BLToolkit.Fluent.Test.MockDataBase
|
|
5 {
|
|
6 /// <summary>
|
|
7 /// For BLToolkit
|
|
8 /// </summary>
|
|
9 public class MockSqlProvider : BasicSqlProvider
|
|
10 {
|
|
11 public const string FieldMarker = "{D02ADC4A-7838-4FA8-8AD7-1DCE93C8098E}";
|
|
12 public const string TableMarker = "{A96D8597-A829-496C-AA71-0ED995E184CE}";
|
|
13
|
|
14 protected override ISqlProvider CreateSqlProvider()
|
|
15 {
|
|
16 return new MockSqlProvider();
|
|
17 }
|
|
18
|
|
19 public override object Convert(object value, ConvertType convertType)
|
|
20 {
|
|
21 if (ConvertType.NameToQueryField == convertType)
|
|
22 {
|
|
23 return FieldMarker + value;
|
|
24 }
|
|
25 if (ConvertType.NameToQueryTable == convertType)
|
|
26 {
|
|
27 return TableMarker + value;
|
|
28 }
|
|
29 return base.Convert(value, convertType);
|
|
30 }
|
|
31 }
|
|
32 } |