public ArticlesControllerTests() { _connection = new SqliteConnection("DataSource=:memory:"); _connection.Open(); options = new DbContextOptionsBuilder <CrossBlogDbContext>() .UseSqlite(_connection) .Options; using (var context = new CrossBlogDbContext(options)) { context.Database.EnsureCreated(); } _context = new CrossBlogDbContext(options); _articlesController = new ArticlesController(new ArticleRepository(_context)); }
public ArticleRepository(CrossBlogDbContext dbContext) : base(dbContext) { }
public BlogDbInitializer(CrossBlogDbContext dbContext) { _dbContext = dbContext; }
public CommentRepository(CrossBlogDbContext dbContext) { _dbContext = dbContext; }
public DatabaseSeeder(CrossBlogDbContext context) { _context = context; }
public AuthorRepository(CrossBlogDbContext dbContext) { _dbContext = dbContext; }
public MediaArticleRepository(CrossBlogDbContext dbContext) { _dbContext = dbContext; }
public CommentRepository(CrossBlogDbContext dbContext) : base(dbContext) { }
public TagRepository(CrossBlogDbContext dbContext) { _dbContext = dbContext; }
protected GenericRepository(CrossBlogDbContext dbContext) { DbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); }
public ConfigurationRepository(CrossBlogDbContext dbContext) { _dbContext = dbContext; }
public CategoryRepository(CrossBlogDbContext dbContext) { _dbContext = dbContext; }