public Repository(IServiceProvider serviceProvider) { var context = serviceProvider.GetRequiredService <PhotoBankDbContext>(); this._context = context; _entities = context.Set <TTable>(); }
public static void Initialize(PhotoBankDbContext context) { context.Database.EnsureCreated(); }