public ActionResult AssignTask(int taskId, string userId) { var task = db.Tasks.Find(taskId); var developer = db.Users.Find(userId); if (task != null && developer != null) { taskHelper.AssignDev(taskId, userId); return(RedirectToAction("ProjectDisplay", "Projects")); } else { return(HttpNotFound()); } }