Esempio n. 1
0
        public DbContext(string name)
        {
            mappingDataSet = new MappingDataSet(Mapper.MapperCreator);

            dbServer = new DbServerBase(name, mappingDataSet);

            this.dbQueriers = new List <IDbQuery>();
        }
Esempio n. 2
0
        public DbContext(string name)
        {
            var dbServer = new DbServerBase(name);

            provider = new DbQueryProvider(dbServer);

            mappingDataSet = new MappingDataSet(Mapper.MapperCreator);

            this.dbQueriers = new List <IDbQuery>();

            InitDb();//初始化数据库上下文
        }
Esempio n. 3
0
        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;
        }