public static IEnumerable <GameView> GetFilteredGameViews(this AvalonDBDataContext dbcontext) { return(QueryRestrictions.FilterGameViews(dbcontext.GameViews)); }
public static double EvilWr(this Player player) { return((double)QueryRestrictions.FilterParticipations(player.Participations) .Count(x => !x.GameRole.Side && !x.GameView.WonBy) / EvilGamesCount(player) * 100); }
public static double GeneralWr(this Player player) { return((double)QueryRestrictions.FilterParticipations(player.Participations) .Count(x => x.GameRole.Side == x.GameView.WonBy) / PlayedGamesCount(player) * 100); }
public static int EvilGamesCount(this Player player) { return(QueryRestrictions.FilterParticipations(player.Participations).Count(x => !x.GameRole.Side)); }
public static int PlayedGamesCount(this Player player) => QueryRestrictions.FilterParticipations(player.Participations).Count();