public Mat ModifyMat(Mat newMat)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newMat).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Mat)db.Mats.Find(newMat.MatId);
     }
 }
 public Member ModifyMember(Member newMember)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newMember).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Member)db.Members.Find(newMember.MemberId);
     }
 }
 public Description ModifyDescription(Description newDescription)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newDescription).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Description)db.Descriptions.Find(newDescription.DescriptionId);
     }
 }
 public Year ModifyYear(Year newYear)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newYear).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Year)db.Years.Find(newYear.YearId);
     }
 }
 public CompetitionType ModifyCompetitionType(CompetitionType newCompetition)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newCompetition).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (CompetitionType)db.CompetitionTypes.Find(newCompetition.CompetitionTypeId);
     }
 }
 public MatchType ModifyMatchType(MatchType newMatchType)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newMatchType).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (MatchType)db.MatchTypes.Find(newMatchType.MatchTypeId);
     }
 }
 public Robot ModifyRobot(Robot newRobot)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newRobot).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Robot)db.Robots.Find(newRobot.RobotId);
     }
 }
 public Team ModifyTeam(Team newTeam)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newTeam).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Team)db.Teams.Find(newTeam.TeamId);
     }
 }
 public Strength ModifyStrength(Strength newStrength)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newStrength).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Strength)db.Strengths.Find(newStrength.StrengthId);
     }
 }
 public Game ModifyGame(Game newGame)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newGame).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Game)db.Games.Find(newGame.GameId);
     }
 }
 public Match ModifyMatch(Match newMatch)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newMatch).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Match)db.Matches.Find(newMatch.MatchId);
     }
 }
 public Obstacle ModifyObstacle(Obstacle newObstacle)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newObstacle).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Obstacle)db.Obstacles.Find(newObstacle.ObstacleId);
     }
 }