comparison UnitTests/Fluent/MockDataBase/MockSqlProvider.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 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 }