public async Task <bool> KickPlayer(int clubId, int playerId) { Club club = await GetClubById(clubId); if (club == null) { return(false); } Member player = await _membersRepository.GetPlayerById(playerId); if (player == null) { return(false); } bool isSuccess = true; if (club.Members.Contains(player)) { isSuccess = club.Members.Remove(player); } return(isSuccess); }
public Task <Member> GetPlayerById(int playerId) { return(_membersRepository.GetPlayerById(playerId)); }