public ActionResult Create(RoomModel model) { if (ModelState.IsValid) { model.CreatedBy = (string)Session["Username"]; RoomModel room = roomDal.CreateChatRoom(model); return(RedirectToAction("View", "Rooms", new { id = room.Id })); } else { return(View("Create", model)); } }