Пример #1
0
 public bool AddMatch(NashGaming.Models.Match match)
 {
     try
     {
         context.Matches.Add(match);
         context.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Пример #2
0
        public bool RemoveMatchFromLadder(int id, NashGaming.Models.Match m)
        {
            Ladder l = this.GetLadderById(id);

            try
            {
                l.Matches.Remove(m);
                context.SaveChanges();
                return(true);
            } catch
            {
                return(false);
            }
        }
Пример #3
0
        public bool AddMatchToLeague(int id, NashGaming.Models.Match m)
        {
            League l = this.GetLeagueByID(id);

            try
            {
                l.Matches.Add(m);
                context.SaveChanges();
                return(true);
            }
            catch
            {
                return(false);
            }
        }