public ActionResult TrainerFeedback(int id) { string currentUserId = Session["UserId"] == null ? string.Empty : Session["UserId"].ToString(); var userType = Session["UserType"] == null?UserType.None.ToString() : Session["UserType"].ToString(); var trainerFeedbackList = new CustomTrainerFeedbackModel(); string currentUserMailId = Session["UserEmailId"] == null ? string.Empty : Session["UserEmailId"].ToString(); var batchId = _Inductee.FindByEmail(currentUserMailId); if (userType == UserType.Trainer.ToString()) { trainerFeedbackList = TrainerFeedbackRepo.GetTrainerFeedbackList(id); } else if (userType == UserType.Trainee.ToString()) { trainerFeedbackList = TrainerFeedbackRepo.GetTrainerFeedbackListForTrainer(batchId.BatchID, currentUserId); } TempData["CurrentBatchID"] = id; return(View("TrainerFeedback", trainerFeedbackList)); }