Beispiel #1
0
        public PostRepositoryTests()
        {
            SeedDatabase();

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