示例#1
0
        public IEntityMetaService <TEntity> Resolve <TEntity>() where TEntity : class
        {
            var type = typeof(TEntity);
            //var ormEntitySchemaAdapter = relationDbSchemaAdapters[type.FullName];

            var ormEntitySchemaAdapter2  = new OrmEntitySchemaAdapter <TEntity>(model, new SqlServerOrmEntitySchemaAdapter(model, type));
            var entityStorageMetaService = new EntityStorageMetaService <TEntity>(ormEntitySchemaAdapter2, type, model, analyze);

            return(entityStorageMetaService);
        }
示例#2
0
 public EntityStorageMetaService(
     OrmEntitySchemaAdapter <TEntity> ormEntitySchemaAdapter,
     Type type,
     DbContext model,
     Func <Exception, Type, IOrmEntitySchemaAdapter, string, StorageResult> analyze)
 {
     this.ormEntitySchemaAdapter = ormEntitySchemaAdapter;
     this.type    = type;
     this.analyze = analyze;
     this.model   = model;
 }
示例#3
0
            public IOrmEntitySchemaAdapter <TEntity> GetOrmEntitySchemaAdapter()
            {
                var @output = new OrmEntitySchemaAdapter <TEntity>(model, ormEntitySchemaAdapter);

                return(@output);
            }