Ejemplo n.º 1
0
        public ActionResult Join(string roomName, string username)
        {
            RoomModel room = roomDal.GetChatRoom(roomName);

            if (room != null)
            {
                roomDal.LeaveChatRooms(username);
                roomDal.JoinChatRoom(room.Id, username);
                return(RedirectToAction("View", "Rooms", new { id = room.Id }));
            }

            return(RedirectToAction("Index", "Rooms"));
        }