예제 #1
0
        public MainServicioTest()
        {
            // Logger Factory
            ILoggerFactory loggerFactory = new LoggerFactory().AddConsole().AddDebug();

            Logger = loggerFactory.CreateLogger <MainServicioTest>();

            Logger.LogInformation("Initializing Test ..");

            // SQLite en memoria
            var connection = new SqliteConnection("DataSource=:memory:");

            connection.Open();

            // Opciones de inicializacion del CotizacionesContext
            var options = new DbContextOptionsBuilder <CotizacionesContext>()
                          .UseSqlite(connection)
                          .Options;

            // inicializacion del CotizacionesContext
            CotizacionesContext backend = new CotizacionesContext(options);

            // Crear la base de datos
            backend.Database.EnsureCreated();

            // Servicio a probar
            Servicio = new MainServicio(backend, loggerFactory);

            Logger.LogInformation("Initialize Test ok.");
        }
예제 #2
0
 public AddServicioPageModel(CotizacionesContext context)
 {
     _context = context;
 }
예제 #3
0
 public UsuarioController(CotizacionesContext context)
 {
     _context = context;
 }
 public PersonaController(CotizacionesContext context)
 {
     _context = context;
 }
예제 #5
0
 public CotizacionController(CotizacionesContext context)
 {
     _context = context;
 }
 public ClienteController(CotizacionesContext context)
 {
     _context = context;
     _logic   = new ControllerLogic();
 }
 public ServicioController(CotizacionesContext context)
 {
     _context = context;
 }
 public ViewServicioDetallePageModel(CotizacionesContext context)
 {
     _context = context;
 }
예제 #9
0
 public IndexModel(CotizacionesContext context)
 {
     _context = context;
 }
예제 #10
0
 public CotizacionesRepository(CotizacionesContext context)
 {
     _context = context;
 }
 public AddClientePageModel(CotizacionesContext context)
 {
     _context = context;
 }
 public ListaController(CotizacionesContext context)
 {
     _context = context;
     repo     = new CotizacionesRepository(context);
 }