Example #1
0
 public bool addLine(int goals, int assists)
 {
     using (var db = new SimonOMarcusEntities())
     {
         var stats = new Stat
         {
             StatId  = Guid.NewGuid(),
             Goals   = goals,
             Assists = assists
         };
         db.Stat.Add(stats);
         db.SaveChanges();
         return(true);
     }
 }
Example #2
0
 public bool AddGame(string id, int?homeScore, int?awayScore, string homeTeam, string awayTeam)
 {
     using (var context = new SimonOMarcusEntities())
     {
         var game = new Games
         {
             GameId    = id,
             AwayTeam  = awayTeam,
             HomeTeam  = homeTeam,
             HomeScore = homeScore,
             AwayScore = awayScore
         };
         context.Games.Add(game);
         context.SaveChanges();
         return(true);
     }
 }