// GET: Chat/Chatrooms/Edit/5 public async Task <IActionResult> Edit(int?id) { if (id == null) { return(NotFound()); } var chatroom = await _service.GetChatroomAsync(id.Value); if (chatroom == null) { return(NotFound()); } return(View(chatroom)); }