常用方法
常用方法
常用方法
常用方法
private async Task <Group> RemoveFromMessageGroup() { var group = await messageRepository.GetGroupForConnection(Context.ConnectionId); var connection = group.Connections.FirstOrDefault(x => x.ConnectionId == Context.ConnectionId); messageRepository.RemoveConnection(connection); if (await messageRepository.SaveAllAsync()) { return(group); } throw new HubException("Failed to remove from group"); }