public void Delete(ShotType model)
 {
     using (var context = new BolfTrackerContext())
     {
         context.ShotTypes.Remove(model);
         context.SaveChanges();
     }
 }
 public void Add(ShotType model)
 {
     using (var context = new BolfTrackerContext())
     {
         context.ShotTypes.Attach(model);
         context.Entry(model).State = EntityState.Added;
         context.SaveChanges();
     }
 }
 public static PlayerRivalryStatistics CreatePlayerRivalryStatistics(Game game, Player player, Player affectedPlayer, Hole hole, ShotType shotType)
 {
     return new PlayerRivalryStatistics
     {
         Game = game,
         Player = player,
         AffectedPlayer = affectedPlayer,
         Hole = hole,
         ShotType = shotType,
         Attempts = 10,
         Points = 5
     };
 }
        public void Update(int id, int points, ShotType shotType)
        {
            var shot = _shotRepository.GetById(id);

            shot.Points = points;
            shot.ShotType = shotType;

            _unitOfWork.Commit();
        }
 public static Shot CreateShot(Game game, Player player, ShotType shotType, Hole hole)
 {
     return new Shot
     {
         Game = game,
         Player = player,
         ShotType = shotType,
         Hole = hole,
         ShotMade = true,
         Attempts = 1,
         Points = 10
     };
 }
        public void Update(int id, int points, ShotType shotType)
        {
            var shot = _shotRepository.GetById(id);

            shot.Points = points;
            shot.ShotType = shotType;

            _shotRepository.Update(shot);
        }