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));
        }
Пример #2
0
 public EfRepository(PrateleiraLivrosContext dbContext)
 {
     _dbContext = dbContext;
 }