public async Task <ActionResult <List <VisitDetails> > > Visits(int petId, CancellationToken cancellationToken) { var visits = await _visitsRepo.FindByPetId(petId, cancellationToken); var ret = new List <VisitDetails>(); foreach (var visit in visits) { ret.Add(VisitDetails.FromVisit(visit)); } return(Ok(ret)); }
public async Task <ActionResult <List <DTOs.Visit> > > Visits(int petId, CancellationToken cancellationToken) { var visits = await _visitsRepo.FindByPetId(petId, cancellationToken); return(Ok(visits)); }