public Year CreateYear(Year year)
 {
     using (var db = new DatabaseContext())
     {
         var CreatedYear = db.Years.Add((EntityFramework.Year)year);
         db.SaveChanges();
         return (Year)CreatedYear;
     }
 }
 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);
     }
 }
 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 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 Competition CreateCompetition(Competition competition)
 {
     using (var db = new DatabaseContext())
     {
         Competition CreatedCompetition = (Competition)db.Competitions.Add((EntityFramework.Competition)competition);
         db.SaveChanges();
         return CreatedCompetition;
     }
 }
 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 CreateMatchType(MatchType matchType)
 {
     using (var db = new DatabaseContext())
     {
         var CreatedMatchType = db.MatchTypes.Add((EntityFramework.MatchType)matchType);
         db.SaveChanges();
         return (MatchType)CreatedMatchType;
     }
 }
 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 Team CreateTeam(Team team)
 {
     using (var db = new DatabaseContext())
     {
         Team CreatedTeam = (Team)db.Teams.Add((EntityFramework.Team)team);
         db.SaveChanges();
         return CreatedTeam;
     }
 }
 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 Strength CreateStrength(Strength strength)
 {
     using(var db = new DatabaseContext())
     {
         Strength CreatedStrength = (Strength)db.Strengths.Add((EntityFramework.Strength)strength);
         db.SaveChanges();
         return CreatedStrength;
     }
 }
 public Game CreateGame(Game game)
 {
     using (var db = new DatabaseContext())
     {
         Game CreatedGame =  (Game)db.Games.Add((EntityFramework.Game)game);
         db.SaveChanges();
         return CreatedGame;
     }
 }
 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 Match CreateMatch(Match match)
 {
     using (var db = new DatabaseContext())
     {
         Match CreatedMatch = (Match)db.Matches.Add((EntityFramework.Match)match);
         db.SaveChanges();
         return CreatedMatch;
     }
 }
 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 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 CompetitionType CreateCompetitionType(CompetitionType competitionType)
 {
     using (var db = new DatabaseContext())
     {
         CompetitionType CreatedCompetitionType = (CompetitionType)db.CompetitionTypes.Add((EntityFramework.CompetitionType)competitionType);
         db.SaveChanges();
         return CreatedCompetitionType;
     }
 }
 public Robot CreateRobot(Robot robot)
 {
     using (var db = new DatabaseContext())
     {
         var CreatedRobot = db.Robots.Add((EntityFramework.Robot)robot);
         db.SaveChanges();
         return (Robot)CreatedRobot;
     }
 }
 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 Mat CreateMat(Mat mat)
 {
     using (var db = new DatabaseContext())
     {
         Mat addedMat = (Mat)db.Mats.Add((EntityFramework.Mat)mat);
         db.SaveChanges();
         return addedMat;
     }
 }
 public Obstacle CreateObstacle(Obstacle obstacle)
 {
     using (var db = new DatabaseContext())
     {
         Obstacle CreateObstacle = (Obstacle)db.Obstacles.Add((EntityFramework.Obstacle)obstacle);
         db.SaveChanges();
         return CreateObstacle;
     }
 }
 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 Description CreateDescription(Description description)
 {
     using (var db = new DatabaseContext())
     {
         Description CreatedDescription = (Description)db.Descriptions.Add((EntityFramework.Description)description);
         db.SaveChanges();
         return CreatedDescription;
     }
 }
 public Position CreatePosition(Position position)
 {
     using(var db = new DatabaseContext())
     {
         Position CreatedPosition = (Position)db.Positions.Add((EntityFramework.Position)position);
         db.SaveChanges();
         return CreatedPosition;
     }
 }
 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 Member CreateMember(Member member)
        {
            using (var db = new DatabaseContext())
            {
                Member CreatedMember =(Member)db.Members.Add((EntityFramework.Member)member);
                db.SaveChanges();
                return CreatedMember;

            }
        }