public async Task <ActionResult> AjaxDelete(int courseId) { var result = await CatalogManager.DeleteCourseFromLearningPlanAsync(UserId, courseId); return(result.Succeeded ? (ActionResult) new HttpStatusCodeResult(HttpStatusCode.NoContent) : JsonNetError(result.Errors)); }