public DbContext(string name) { mappingDataSet = new MappingDataSet(Mapper.MapperCreator); dbServer = new DbServerBase(name, mappingDataSet); this.dbQueriers = new List <IDbQuery>(); }
public DbContext(string name) { var dbServer = new DbServerBase(name); provider = new DbQueryProvider(dbServer); mappingDataSet = new MappingDataSet(Mapper.MapperCreator); this.dbQueriers = new List <IDbQuery>(); InitDb();//初始化数据库上下文 }
public static void Main(string[] args) { DbServerBase A = new DbServerBase("123"); try { List <RelationModel> relations = new ModelUtil(typeof(Student)).GetRelations(); A.CreateTable(relations[0]); } catch (Exception ex) { var a = ex.Message; //4060 a = null; } return; }