public void Setup() { var options = new DbContextOptionsBuilder <CreditoContext>().UseSqlServer("Server=localhost;Database=AcmeLtda;Trusted_Connection=True;MultipleActiveResultSets=true").Options; Context = new CreditoContext(options); UnitOfWork = new UnitOfWork(Context); }
public void Setup() { var optionsSqlServer = new DbContextOptionsBuilder <CreditoContext>() .UseSqlServer("Server=(localdb)\\MSSQLLocalDB;Database=Parcial;Trusted_Connection=True;MultipleActiveResultSets=true") .Options; _context = new CreditoContext(optionsSqlServer); }
public ServicioAbono(CreditoContext contexto) { _contexto = contexto; }
//Se Recomienda solo dejar la Unidad de Trabajo public CreditoController(CreditoContext context, IUnitOfWork unitOfWork) { _unitOfWork = unitOfWork; _context = context; }
public ServicioEmpresa(CreditoContext contexto) { _contexto = contexto; }
public CreditoController(CreditoContext context, IUnitOfWork unitofWorck) { _context = context; _unitOfWork = unitofWorck; }
public AbonoController(CreditoContext contexto) { _servicioAbono = new ServicioAbono(contexto); }
public EmpresaController(CreditoContext contexto) { _servicioEmpresa = new ServicioEmpresa(contexto); }
public void Setup() { var optionsInMemory = new DbContextOptionsBuilder <CreditoContext>().UseInMemoryDatabase("Credito").Options; _context = new CreditoContext(optionsInMemory); }