Exemplo n.º 1
0
        public AdditionalGame Update(AdditionalGame additionalGameChanges)
        {
            var additionalGame = context.AdditionalGames.Attach(additionalGameChanges);

            additionalGame.State = EntityState.Modified;
            context.SaveChanges();
            return(additionalGameChanges);
        }
Exemplo n.º 2
0
        public AdditionalGame Delete(int id)
        {
            AdditionalGame additionalGame = context.AdditionalGames.Find(id);

            if (additionalGame != null)
            {
                context.AdditionalGames.Remove(additionalGame);
                context.SaveChanges();
            }
            return(additionalGame);
        }
Exemplo n.º 3
0
 public AdditionalGame Add(AdditionalGame additionalGame)
 {
     context.Add(additionalGame);
     context.SaveChanges();
     return(additionalGame);
 }