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); }
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; }
public IOrmEntitySchemaAdapter <TEntity> GetOrmEntitySchemaAdapter() { var @output = new OrmEntitySchemaAdapter <TEntity>(model, ormEntitySchemaAdapter); return(@output); }