Ejemplo n.º 1
0
 public void game_Rating_add(GameRating char_Rating)
 {
     using (Course_workContext db = new Course_workContext())
     {
         db.GameRatings.Add(char_Rating);
         db.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public void Player_edit(Player char_)
 {
     using (Course_workContext db = new Course_workContext())
     {
         var m = Player_get_by_id(char_.Id);
         m = char_;
         db.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public void Game_edit(Game acc)
 {
     using (Course_workContext db = new Course_workContext())
     {
         var d = Game_get_by_id(acc.Id);
         d = acc;
         db.SaveChanges();
     }
 }
Ejemplo n.º 4
0
 public void Rating_edit(Rating Rating)
 {
     using (Course_workContext db = new Course_workContext())
     {
         var a = Rating_get_by_id(Rating.Id);
         a = Rating;
         db.SaveChanges();
     }
 }
Ejemplo n.º 5
0
 public int Player_add(Player char_)
 {
     using (Course_workContext db = new Course_workContext())
     {
         db.Players.Add(char_);
         db.SaveChanges();
         var m = db.Players.Max(m => m.Id);
         return(m);
     }
 }
Ejemplo n.º 6
0
 public int Game_add(Game acc)
 {
     using (Course_workContext db = new Course_workContext())
     {
         db.Games.Add(acc);
         db.SaveChanges();
         var d = db.Games.Max(d => d.Id);
         return(d);
     }
 }
Ejemplo n.º 7
0
 public int Rating_add(Rating Rating)
 {
     using (Course_workContext db = new Course_workContext())
     {
         db.Ratings.Add(Rating);
         db.SaveChanges();
         var a = db.Ratings.Max(a => a.Id);
         return(a);
     }
 }
Ejemplo n.º 8
0
 public bool Player_delete(int char_id)
 {
     using (Course_workContext db = new Course_workContext())
     {
         var chara = Player_get_by_id(char_id);
         if (chara == null)
         {
             return(false);
         }
         db.Players.Remove(chara);
         db.SaveChanges();
         return(true);
     }
 }
Ejemplo n.º 9
0
 public bool game_Rating_delete(int l_id)
 {
     using (Course_workContext db = new Course_workContext())
     {
         var nom = db.GameRatings.FirstOrDefault(n => n.Id == l_id);
         if (nom == null)
         {
             return(false);
         }
         db.GameRatings.Remove(nom);
         db.SaveChanges();
         return(true);
     }
 }
Ejemplo n.º 10
0
 public bool Game_delete(int acc_id)
 {
     using (Course_workContext db = new Course_workContext())
     {
         var director = Game_get_by_id(acc_id);
         if (director == null)
         {
             return(false);
         }
         db.Games.Remove(director);
         db.SaveChanges();
         return(true);
     }
 }
Ejemplo n.º 11
0
 public bool Rating_delete(int i_id)
 {
     using (Course_workContext db = new Course_workContext())
     {
         var Rating = Rating_get_by_id(i_id);
         if (Rating == null)
         {
             return(false);
         }
         db.Ratings.Remove(Rating);
         db.SaveChanges();
         return(true);
     }
 }