public async Task <List <VisitDto> > GetAllVisits() { var visits = await _visitRepository.GetAllVisits(); var result = _mapper.Map <List <VisitDto> >(visits); return(result); }
public ActionResult Calendar() { List <DateTime> model = new List <DateTime>(); string doctorLogin = User.Identity.Name; foreach (Visit visit in visitRepository.GetAllVisits(doctorLogin)) { model.Add( visit.VisitDate.HasValue ? visit.VisitDate.Value : (visit.ExpectedVisitDate ?? DateTime.MinValue) ); } return(PartialView("_Calendar", model)); }