private int ObterTotalDocumentos(DateTime dataInicial, DateTime dataFinal) { return (_documentoRepository.GetAll() .Select( d => d.DataEmissao >= dataInicial & d.DataEmissao <= dataFinal && d.FaseDocumento == EQualy.Domain.Enum.Documento.FaseDocumento.Disponibilizado) .Count()); }
public async Task <IHttpActionResult> GetAll() { try { log.Info(new MDCSet(this.ControllerContext.RouteData)); var entities = await _entityRepo.GetAll(); return(Ok(entities)); } catch (Exception e) { log.Error(new MDCSet(this.ControllerContext.RouteData), e); return(InternalServerError(e)); } }