protected async Task <EfRepository <T> > GetRepository(bool seed = false) { var options = CreateNewContextOptions(); DbContext = new PrateleiraLivrosContext(options); if (seed) { await PrateleiraLivrosContextSeed .SeedAsync(DbContext); } return(new EfRepository <T>(DbContext)); }
public EfRepository(PrateleiraLivrosContext dbContext) { _dbContext = dbContext; }