public void game_Rating_add(GameRating char_Rating) { using (Course_workContext db = new Course_workContext()) { db.GameRatings.Add(char_Rating); db.SaveChanges(); } }
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(); } }
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(); } }
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(); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }