Exemple #1
0
 public BaseRepository()
 {
     DbContext.Init(BaseDBConfig.ConnectionString);
     context  = DbContext.GetDbContext();
     db       = context.Db;
     entityDB = context.GetEntityDB <TEntity>(db);
 }
 public AdvertisementRepository()
 {
     DbContext.Init(BaseDBConfig.ConnectionString);
     context  = DbContext.GetDbContext();
     db       = context.Db;
     entityDB = context.GetEntityDB <UserInfo>(db);
 }
Exemple #3
0
 public AdvertisementRepository()
 {
     DbContext.Init(BaseDBConfig.ConnectionString);
     context = DbContext.GetDbContext();
     db      = context.Db;
     //创建数据库
     db.CodeFirst.SetStringDefaultLength(200).InitTables(typeof(Advertisement));
     entityDB = context.GetEntityDB <Advertisement>(db);
 }