0
|
1 using System;
|
|
2 using BLToolkit.Data;
|
|
3
|
|
4 namespace BLToolkit.Mapping
|
|
5 {
|
|
6 public class DataBindingMappingSchema : MappingSchema
|
|
7 {
|
|
8 protected override ObjectMapper CreateObjectMapperInstance(Type type)
|
|
9 {
|
|
10 var res = new DataBindingObjectMapper(type);
|
|
11
|
|
12 return res;
|
|
13 }
|
|
14 }
|
|
15
|
|
16 public class FullDataBindingMappingSchema : FullMappingSchema
|
|
17 {
|
|
18 private readonly DbManager _db;
|
|
19 private readonly bool _ignoreLazyLoad;
|
|
20
|
|
21 public FullDataBindingMappingSchema(DbManager db, bool ignoreLazyLoad = false, MappingSchema parentMappingSchema = null)
|
|
22 : base(db, ignoreLazyLoad, parentMappingSchema, FactoryType.LazyLoadingWithDataBinding)
|
|
23 {
|
|
24 _db = db;
|
|
25 _ignoreLazyLoad = ignoreLazyLoad;
|
|
26 }
|
|
27
|
|
28 protected override ObjectMapper CreateObjectMapperInstance(Type type)
|
|
29 {
|
|
30 return new FullDataBindingObjectMapper(_db, _ignoreLazyLoad);
|
|
31 }
|
|
32 }
|
|
33 } |