public void Update(SubSession sessionSubtotal) { t_sessionsubtotal entity = _sqlRepository.Find(_ => _.SessionSubtotalId == sessionSubtotal.SessionSubtotalId).Single(); entity.UpdateEntity(sessionSubtotal); _sqlRepository.Commit(); }
public void Create(SubSession sessionSubtotal) { t_sessionsubtotal entity = new t_sessionsubtotal(); entity.UpdateEntity(sessionSubtotal); _sqlRepository.Insert(entity); sessionSubtotal.SessionSubtotalId = entity.SessionSubtotalId; }
public static t_sessionsubtotal UpdateEntity(this t_sessionsubtotal entity, SubSession sessionSubtotal) { entity.SessionId = sessionSubtotal.SessionId; entity.BestShotId = sessionSubtotal.BestShotId; entity.SubtotalOrdinal = sessionSubtotal.Ordinal; return entity; }
public SubSession CreateSubSession() { SubSession subSession = new SubSession(); subSession.SessionId = SessionId; subSession.Ordinal = _subSessions.Count; _subSessions.Add(subSession); return subSession; }
public SubSession CreateSubSession() { SubSession subSession = new SubSession(); subSession.SessionId = SessionId; subSession.Ordinal = _subSessions.Count; _subSessions.Add(subSession); return(subSession); }
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(SubSession sessionSubtotal) { t_sessionsubtotal entity = _sqlRepository.Find(_ => _.SessionSubtotalId == sessionSubtotal.SessionSubtotalId).Single(); _sqlRepository.Delete(entity); }