public ModelBase(IServiceProvider serviceProvider) { DbContextOptions <DbContext> options; var builder = new DbContextOptionsBuilder <DbContext>(); builder.UseSqlServer(Guid.NewGuid().ToString()); options = builder.Options; _context = new MyComercioContext(options); }
public Pais GetPais() { Pais pais; using (var context = new MyComercioContext()) { pais = context.Pais.Where(x => x.Id == IdPais).FirstOrDefault(); } return(pais); }
public CategoriaProducto GetCategoria() { CategoriaProducto categoria; using (MyComercioContext context = new MyComercioContext()) { categoria = context.CategoriaProducto.Where(x => x.Id == IdCategoriaProducto).FirstOrDefault(); } return(categoria); }
public Ciudad GetCiudad() { Ciudad ciudad; using (var context = new MyComercioContext()) { ciudad = context.Ciudad.Where(x => x.Id == IdCiudad).FirstOrDefault(); } return(ciudad); }
public override bool IsValid(object value) { Pais pais; using (var context = new MyComercioContext()) { pais = context.Pais.Where(x => x.Description.Trim().ToUpper() == value.ToString().Trim().ToUpper()).FirstOrDefault(); } var ret = (pais == null); return(ret); }
public CiudadController(MyComercioContext context) { _context = context; }
public VentaDetallesController(MyComercioContext context) { _context = context; }
public VentasVMController(MyComercioContext context) { _context = context; }
public MarcasController(MyComercioContext context) { _context = context; }
public PersonasController(MyComercioContext context) { _context = context; }
public ProductosController(MyComercioContext context, IWebHostEnvironment hostEnvironment) { _context = context; _hostEnvironment = hostEnvironment; }
public ProductoController(MyComercioContext context) { _context = context; }
public Ciudad(MyComercioContext context) { _context = context; }
public PaisController(MyComercioContext context) { _context = context; }
public ClientesController(MyComercioContext context) { _context = context; }
public CategoriaProductoesController(MyComercioContext context) { _context = context; }
public VendedorsController(MyComercioContext context) { _context = context; }