Mercurial > pub > bltoolkit
comparison Extensions/JointureAddOn/Mapping/DataBindingMappingSchema.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 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 } |