public bool DeletePlayerMatches(Match match) { var playerMatchesToDelete = context.PlayerMatches.Where(x => x.MatchID == match.MatchID); context.PlayerMatches.RemoveRange(playerMatchesToDelete); Save(); return true; }
public bool DeleteMatch(Match match) { bool playerMatchesDeleted = playerMatchRepository.DeletePlayerMatches(match); bool matchDeleted = matchRepository.DeleteMatch(match); return (playerMatchesDeleted && matchDeleted); }
public Match InsertMatch(Match match) { return new Match { MatchID = 1, MatchDate = DateTime.Today }; }
public ButtonViewModel(IFootballRepository footballRepository, IPlayerMatchViewModel playerMatchViewModel, IMatchValidatorService matchValidatorService, IMailerService mailerService) { _footballRepository = footballRepository; _playerMatchViewModel = playerMatchViewModel; _matchValidatorService = matchValidatorService; _matchValidatorService.PlayerMatches = _playerMatchViewModel.PlayerMatches; _selectedMatch = new Match(); _mailerService = mailerService; _canExecute = true; }
public bool DeletePlayerMatches(Match match) { return true; }
public bool DeleteMatch(Match match) { return true; }
public bool DeletePlayerMatches(Match match) { return playerMatchRepository.DeletePlayerMatches(match); }
public Match InsertMatch(Match match) { return matchRepository.InsertMatch(match); }
public static Match GetNewSubsequentMatch(this Match match) { Match newMatch = new Match(); newMatch.MatchDate = match.MatchDate.Value.AddDays(7); return newMatch; }
public void UpdateMatch(Match match) { context.Entry(match).State = EntityState.Modified; }
public Match InsertMatch(Match match) { context.Matches.Add(match); Save(); return match; }
public bool DeleteMatch(Match match) { context.Matches.Remove(match); Save(); return true; }