public async Task <IList <ChatRoom> > GetChatRoomsForUserAsync(string username) { var rooms = await _chatRoomRepository.FindAllAsync(room => room.Users.Contains(username)); return(rooms.OrderByDescending(room => room.LastMessageTime).ToList()); }