// GET: Venta public async Task <IActionResult> Index() { try { ViewBag.CantidadAlarmas = (await productoRepository.GetCantidadAlarmas()).Cantidad; return(View(await ventaRepository.GetAll())); } catch (Exception e) { return(StatusCode((int)System.Net.HttpStatusCode.Unauthorized, e.Message)); //return Unauthorized(e.Message); } }
public IEnumerable <Venta> GetAll() { return(ventaRepo.GetAll()); }