public EfRepository(SuperheroeEntities dbContext) { if (dbContext == null) { throw new ArgumentNullException("Context cannot be null"); } this.DbContext = dbContext; this.DbSet = this.DbContext.Set <T>(); }
public static void Main(string[] args) { var context = new SuperheroeEntities(); context.Database.CreateIfNotExists(); }
public UnitOfWork(SuperheroeEntities context) { this.dbContext = context; }