public ActionResult getDetailsofEvent(CommentViewModel commentViewModel) { if (!ModelState.IsValid) { return(View()); } EventOperations eventOperation = new EventOperations(); CommentModel commentModel = new CommentModel() { Comments = commentViewModel.Comments, EventId = commentViewModel.EventId }; eventOperation.addComment(commentModel); return(RedirectToAction("MyEvents", "Event")); }