public IActionResult GetAll() { Response oResponse = new Response(); try { var list = _facturaService.GetAll(); if (list.Count == 0) { oResponse.Code = 0; oResponse.Message = "listado vacio"; } else { oResponse.Code = 1; oResponse.Message = "listado generado"; oResponse.Data = list; } } catch (Exception e) { oResponse.Message = "error al generar listado de facturas " + e.Message; } return(Ok(oResponse)); }
public void SERV_FacturaServicio_GetAll_NotNull() { var s = new FacturaService(new FacturaRepository()); var x = s.GetAll(50, 0); Assert.IsNotNull(x); }
public async Task <IActionResult> GetAllFactura() { var result = await _facturaService.GetAll(); if (result.Count() == 0) { _logger.LogInfo($"No existe registro de Factura en la base de datos"); return(NotFound()); } return(Ok(result)); }
public List <Factura> listaFactura() { var list = FacturaService.GetAll(); return(list); }