Beispiel #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name")] Chatroom chatroom)
        {
            if (id != chatroom.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                await _service.UpdateChatroomAsync(chatroom);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(chatroom));
        }