Ejemplo n.º 1
0
        public DetalleCarroController(AutoloteDataContext context, DetalleCarroAppService detalleCarroAppService)
        {
            _baseDatos = context;
            _detalleCarroAppService = detalleCarroAppService;

            if (_baseDatos.DetalleCarros.Count() == 0)
            {
                _baseDatos.DetalleCarros.Add(new DetalleCarro {
                    Fecha = 2020, Motor = "3.5", Cilindraje = "v8"
                });
                _baseDatos.DetalleCarros.Add(new DetalleCarro {
                    Fecha = 2020, Motor = "3.5", Cilindraje = "v8"
                });
                _baseDatos.DetalleCarros.Add(new DetalleCarro {
                    Fecha = 2019, Motor = "3.0", Cilindraje = "v6"
                });
                _baseDatos.DetalleCarros.Add(new DetalleCarro {
                    Fecha = 2018, Motor = "2.5", Cilindraje = "v6"
                });
                _baseDatos.DetalleCarros.Add(new DetalleCarro {
                    Fecha = 2017, Motor = "2.0", Cilindraje = "v4"
                });

                _baseDatos.SaveChanges();
            }
        }
Ejemplo n.º 2
0
        public AutoloteController(AutoloteDataContext context, AutoloteAppService autoloteAppService)
        {
            _baseDatos          = context;
            _autoloteAppService = autoloteAppService;

            if (_baseDatos.Carros.Count() == 0)
            {
                _baseDatos.Carros.Add(new Carro {
                    Marca = "Toyora", Modelo = "Land-Cruiser", Color = "Rojo vino", DetalleCarroid = 1
                });
                _baseDatos.Carros.Add(new Carro {
                    Marca = "Nissan", Modelo = "NP-300", Color = "Azul", DetalleCarroid = 2
                });
                _baseDatos.SaveChanges();
            }
        }
 public DetalleCarroAppService(AutoloteDataContext _context, DetalleCarroDomainService detalleCarroDomainService)
 {
     _baseDatos = _context;
     _detalleCarroDomainService = detalleCarroDomainService;
 }
Ejemplo n.º 4
0
 public CarroAppService(AutoloteDataContext _context, CarroDomainService carroDomainService)
 {
     _baseDatos          = _context;
     _carroDomainService = carroDomainService;
 }
Ejemplo n.º 5
0
 public AutoloteAppService(AutoloteDataContext _context, AutoloteDomainService autoloteDomainService)
 {
     _baseDatos             = _context;
     _autoloteDomainService = autoloteDomainService;
 }