Пример #1
0
        static DbContext getDbContext <T>(string manageName)
        {
            var dbLocation = new CRL.DBLocation()
            {
                DataAccessType = DataAccessType.Default, ManageType = typeof(T), ManageName = manageName
            };
            var helper    = SettingConfig.GetDBAccessBuild(dbLocation).GetDBHelper();
            var dbContext = new DbContext(helper, dbLocation);

            return(dbContext);
        }
Пример #2
0
        DbContextInner getDbContext(string manageName)
        {
            var dbLocation = new CRL.DBLocation()
            {
                DataAccessType = DataAccessType.Default, ManageType = GetType(), ManageName = manageName
            };
            var helper    = DBConfigRegister.GetDBHelper(dbLocation);
            var dbContext = new DbContextInner(helper, dbLocation);

            return(dbContext);
        }
Пример #3
0
        DbContext getDbContext()
        {
            var dbLocation = new CRL.DBLocation()
            {
                DataAccessType = DataAccessType.Read, ManageType = typeof(T)
            };
            var helper    = SettingConfig.GetDbAccess(dbLocation);
            var dbContext = new DbContext(helper, dbLocation);

            return(dbContext);
        }