Пример #1
0
        public PostRepositoryTests()
        {
            SeedDatabase();

            _dbContext      = ServiceProvider.GetRequiredService <BlogEntityDbContext>();
            _uow            = ServiceProvider.GetRequiredService <IBlogUnitOfWork>();
            _postRepository = (PostRepository)_uow.Posts;
        }
Пример #2
0
 public AuthorRepository(BlogEntityDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Пример #3
0
 public DatabaseSeed(BlogEntityDbContext context)
 {
     _dbContext = context;
 }
Пример #4
0
 public PostRepository(BlogEntityDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Пример #5
0
 public BlogSettingsRepositoryTests()
 {
     _dbContext = ServiceProvider.GetRequiredService <BlogEntityDbContext>();
     _uow       = ServiceProvider.GetRequiredService <IBlogUnitOfWork>();
     _blogSettingsRepository = (BlogSettingsRepository)_uow.BlogSettings;
 }
Пример #6
0
 public BlogSettingsRepository(BlogEntityDbContext dbContext)
 {
     _dbContext = dbContext;
 }