public void Create(Shot shot)
 {
     t_shot entity = new t_shot();
     entity.UpdateEntity(shot);
     _sqlRepository.Insert(entity);
     shot.ShotId = entity.ShotId;
 }
 public static t_shot UpdateEntity(this t_shot entity, Shot shot)
 {
   entity.PrimaryScore = shot.PrimaryScore;
   entity.SecondaryScore = shot.SecondaryScore;
   entity.ShotOrdinal = shot.Ordinal;
   entity.ValueX = shot.ValueX;
   entity.ValueY = shot.ValueY;
   entity.SubtotalId = shot.SubtotalId;
   return entity;
 }
 private void AddShotToSubsession(ShotEventArgs e, SubSession subSession)
 {
     Shot shot = new Shot
     {
         PrimaryScore = e.PrimaryScore,
         SecondaryScore = e.SecondaryScore,
         LaneNumber = e.LaneNumber,
         SubtotalId = subSession.SessionSubtotalId,
         Ordinal = e.Ordinal,
     };
     _shotDataStore.Create(shot);
 }
 public void Delete(Shot shot)
 {
     t_shot entity = _sqlRepository.Find(_ => _.ShotId == shot.ShotId).Single();
     _sqlRepository.Delete(entity);
 }
 public void Update(Shot shot)
 {
     t_shot entity = _sqlRepository.Find(_ => _.ShotId == shot.ShotId).Single();
     entity.UpdateEntity(shot);
     _sqlRepository.Commit();
 }