public async Task <IActionResult> Index() { var viewModel = new AppointmentsListViewModel { Appointments = await this.appointmentsService.GetAllAsync <AppointmentViewModel>(), }; return(this.View(viewModel)); }
public async Task <IViewComponentResult> InvokeAsync(string partnerId) { var viewModel = new AppointmentsListViewModel { Appointments = await this.appointmentsService.GetAllByPartnerAsync <AppointmentViewModel>(partnerId), }; return(this.View(viewModel)); }
public async Task <IActionResult> Index() { var user = await this.userManager.GetUserAsync(this.HttpContext.User); var userId = await this.userManager.GetUserIdAsync(user); var viewModel = new AppointmentsListViewModel { Appointments = await this.appointmentsService.GetUpcomingByUserAsync <AppointmentViewModel>(userId), }; return(this.View(viewModel)); }
public async Task <IViewComponentResult> InvokeAsync() { var user = await this.userManager.GetUserAsync(this.HttpContext.User); var userId = await this.userManager.GetUserIdAsync(user); var viewModel = new AppointmentsListViewModel { Appointments = await this.appointmentsService.GetPastByUserAsync <AppointmentViewModel>(userId), }; return(this.View(viewModel)); }