/* * * * * */ private async Task <Group> RemoveFromMessageGroup() { var group = await _messageReop.GetGroupForConnection(Context.ConnectionId); var connection = group.Connection.FirstOrDefault(x => x.ConnectionId == Context.ConnectionId); _messageReop.RemoveConnection(connection); if (await _messageReop.SaveAll()) { return(group); } throw new HubException("Failed to remove from group"); }