public IActionResult Index() { var viewModel = new InventariosIndexViewModel() { Inventarios = Mapper.Map <List <InventarioViewModel> >(_inventario.GetAll()) }; return(View(viewModel)); }
public HttpResponseMessage GetAll() { var items = c.GetAll(); if (items.Count() == 0) { //Construyendo respuesta del servidor return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No hay registros de Inventarios")); } return(Request.CreateResponse(HttpStatusCode.OK, items)); }