예제 #1
0
 public void Create(Shot shot)
 {
     t_shot entity = new t_shot();
     entity.UpdateEntity(shot);
     _sqlRepository.Insert(entity);
     shot.ShotId = entity.ShotId;
 }
예제 #2
0
 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);
 }
예제 #4
0
 public void Delete(Shot shot)
 {
     t_shot entity = _sqlRepository.Find(_ => _.ShotId == shot.ShotId).Single();
     _sqlRepository.Delete(entity);
 }
예제 #5
0
 public void Update(Shot shot)
 {
     t_shot entity = _sqlRepository.Find(_ => _.ShotId == shot.ShotId).Single();
     entity.UpdateEntity(shot);
     _sqlRepository.Commit();
 }