public async Task <IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req, ILogger log) { var facilityId = req.Query["facilityId"].ToString(); if (string.IsNullOrEmpty(facilityId)) { return(new BadRequestResult()); } var audits = _auditRepository.Find(x => x.FacilityId == facilityId).ToList(); return(new OkObjectResult(audits.Select(x => new AuditPreviewDto { Id = x.RowKey, FacilityId = x.FacilityId, StartTimeUtc = x.StartTimeUtc, FinishTimeUtc = x.FinishTimeUtc }))); }
public IEnumerable <Audit> GetAudits() { return(_auditRepository.Find(null)); }
public async Task <IList <Audit> > FindAudits(Guid correlationId) { return(await _auditRepository.Find(correlationId)); }