public async Task <ActionResult> Index(int Id) { var token = await O365Util.GetAccessToken(ServiceResources.DemoSite); MailAFOModel dashboardModel = new MailAFOModel(token); var model = await dashboardModel.GetMailAFOViewModel(Id); if (model == null) { return(new RedirectResult("/MailAFO/Index")); } return(View(model)); }
public async Task <ActionResult> Index(int Id) { var token = await AuthenticationHelper.GetAccessTokenAsync(AppSettings.DemoSiteServiceResourceId); MailAFOModel dashboardModel = new MailAFOModel(token); var model = await dashboardModel.GetMailAFOViewModelAsync(Id); if (model == null) { return(Content("Incident not found")); } return(View(model)); }