public EfGenericRepository(TeleimotDbContext context) { if (context == null) { throw new ArgumentException("An instance of DbContext is required to use this repository.", "context"); } this.Context = context; this.DbSet = this.Context.Set <T>(); }
public static void Initialize() { Database.SetInitializer(new MigrateDatabaseToLatestVersion <TeleimotDbContext, Configuration>()); TeleimotDbContext.Create().Database.Initialize(true); }
protected BaseService() { var db = new TeleimotDbContext(); this.Users = new GenericRepository<User>(db); }
protected BaseService() { var db = new TeleimotDbContext(); this.Users = new GenericRepository <User>(db); }