public void SetUp() { //var builder = new DbContextOptionsBuilder<BaseContext>().UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=AvaliacaoCedro;integrated security=True;"); var builder = new DbContextOptionsBuilder <BaseContext>().UseSqlServer("Server=DESKTOP-NBVUSVN\\SQLEXPRESS;Database=AvaliacaoCedro;integrated security=True;"); db = new BaseContext(builder.Options); this.repo = new PratoRepository(db); this.repoR = new RestauranteRepository(db); }
private void SetRepositories() { _restauranteRepository = new RestauranteRepository(Context); _pratoRepository = new PratoRepository(Context); }
public RestauranteController(BaseContext _db) { this.db = _db; this.repo = new RestauranteRepository(db); this.repoP = new PratoRepository(db); }