[HttpGet] // jank way of ensuring compat. with anchor tag calls public async Task <IActionResult> DeleteChatRoom(int chatRoomID) { var foundChat = chatRepo.ChatRoomList.Find(chat => chat.ChatRoomID == chatRoomID); if (foundChat == null) { return(RedirectToAction("ManageChats")); } await chatRepo.DeleteChatRoom(chatRoomID); return(RedirectToAction("ManageChats")); }