예제 #1
0
        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));
        }
예제 #2
0
        public async Task <ActionResult <List <DTOs.Visit> > > Visits(int petId, CancellationToken cancellationToken)
        {
            var visits = await _visitsRepo.FindByPetId(petId, cancellationToken);

            return(Ok(visits));
        }