public DbFixture() { var builder = new DbContextOptionsBuilder(); builder.UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=BestStudentsResult;Trusted_Connection=True;MultipleActiveResultSets=true"); DbContext = new StudentResultsDbContext(builder.Options); }
public InMemoryDbFixture() { var options = new DbContextOptionsBuilder().UseInMemoryDatabase("InMemory").Options; DbContext = new StudentResultsDbContext(options); DbContext.Database.EnsureCreated(); }
public MsSqlDbFixture() { var options = new DbContextOptionsBuilder().UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=Tests;Trusted_Connection=True;MultipleActiveResultSets=true").Options; DbContext = new StudentResultsDbContext(options); DbContext.Database.EnsureCreated(); }
public RatingDbService(StudentResultsDbContext context) { this._context = context; }