internal TypeMapping(MappingModel model, Type type, string tableName) { Model = model; Type = type; TableName = tableName; memberMappings = new Dictionary<string, MemberMapping>(); }
internal TypeMapping(MappingModel model, Type type, string tableName) { Model = model; Type = type; TableName = tableName; memberMappings = new Dictionary <string, MemberMapping>(); }
private TypeMapping CreateTypeMapping(MappingModel model, ITypeMappingConfiguration configuration) { var tableName = GetTableName(configuration); var mapping = new TypeMapping(model, configuration.ElementType, tableName); foreach (var pair in configuration.Members) { var member = pair.Value; var memberMapping = MapMember(mapping, member); mapping.AddMember(memberMapping); } return(mapping); }
public ProviderSettings(string userName, string password, MappingModel model) { if (String.IsNullOrEmpty(userName)) throw new ArgumentNullException("userName"); if (String.IsNullOrEmpty(password)) throw new ArgumentNullException("password"); if (model == null) throw new ArgumentNullException("model"); UserName = userName; Password = password; MappingModel = model; Metadata = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); }
internal MappingModel CreateModel() { var model = new MappingModel(); if (configurations != null) { foreach (var configuration in configurations.Values) { var mapping = CreateTypeMapping(model, configuration); // TODO: make relationships... model.Map(mapping); } } return(model); }
public static IQueryProvider GetQueryProvider(this IQuery context, MappingModel model) { var queryMapping = model.CreateQueryMapping(); return new DeveelDbProvider(context, queryMapping, new EntityPolicy()); }
public DeveelDbMapping(MappingModel model) { Model = model; }