public async Task <ActionResult> AddedCourses(string trainingProviderName, DateTime?addDate) { if (addDate == null || string.IsNullOrWhiteSpace(trainingProviderName)) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var viewModel = await CatalogManager.GetAddedCoursesForDateAsync(addDate.Value, trainingProviderName, UserId, UserSpecializations); if (viewModel == null) { return(HttpNotFound()); } return(PartialView("_CourseListPartial", viewModel));; }