private void UpdateDatabase() { var optionsBuilder = new DbContextOptionsBuilder <BContext>(); var options = optionsBuilder .UseSqlite(Configuration.GetConnectionString("DefaultConnection")) .Options; using (var context = new BContext(options)) { context.Database.Migrate(); } }
public ModeloSeviceTest() { logger = new Mock <ILogger>(); var mapperConfig = new MapperConfiguration(config => { config.AddProfile <AutomapperConfig>(); }); mapperMemory = mapperConfig.CreateMapper(); _contextMemory = InMemoryContextFactory.Create(); this._notificadorMemory = new Notificador(); this._repositoryMemory = new ModeloRepository(_contextMemory); this._serviceMemory = new ModeloService(_notificadorMemory, _repositoryMemory, mapperMemory, logger.Object); ConfigInMemory(); }
public ModeloRepository(Context.BContext db) : base(db) { _context = db; }
protected Repository(BContext db) { Db = db; DbSet = db.Set <TEntity>(); }
public CaminhaoRepository(Context.BContext db) : base(db) { _context = db; }