コード例 #1
0
 public bool DeletePlayerMatches(Match match)
 {
     var playerMatchesToDelete = context.PlayerMatches.Where(x => x.MatchID == match.MatchID);
     context.PlayerMatches.RemoveRange(playerMatchesToDelete);
     Save();
     return true;
 }
コード例 #2
0
        public bool DeleteMatch(Match match)
        {
            bool playerMatchesDeleted = playerMatchRepository.DeletePlayerMatches(match);
            bool matchDeleted = matchRepository.DeleteMatch(match);

            return (playerMatchesDeleted && matchDeleted);
        }
コード例 #3
0
 public Match InsertMatch(Match match)
 {
     return new Match
     {
         MatchID = 1,
         MatchDate = DateTime.Today
     };
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 public bool DeletePlayerMatches(Match match)
 {
     return true;
 }
コード例 #6
0
 public bool DeleteMatch(Match match)
 {
     return true;
 }
コード例 #7
0
 public bool DeletePlayerMatches(Match match)
 {
     return playerMatchRepository.DeletePlayerMatches(match);
 }
コード例 #8
0
 public Match InsertMatch(Match match)
 {
     return matchRepository.InsertMatch(match);
 }
コード例 #9
0
 public static Match GetNewSubsequentMatch(this Match match)
 {
     Match newMatch = new Match();
     newMatch.MatchDate = match.MatchDate.Value.AddDays(7);
     return newMatch;
 }
コード例 #10
0
 public void UpdateMatch(Match match)
 {
     context.Entry(match).State = EntityState.Modified;
 }
コード例 #11
0
 public Match InsertMatch(Match match)
 {
     context.Matches.Add(match);
     Save();
     return match;
 }
コード例 #12
0
 public bool DeleteMatch(Match match)
 {
     context.Matches.Remove(match);
     Save();
     return true;
 }