public void Create(Session session)
 {
   t_session entity = new t_session();
   entity.UpdateEntity(session);
   _sqlRepository.Insert(entity);
   session.SessionId = entity.SessionId;
 }
Пример #2
0
 public static t_session UpdateEntity(this t_session entity, Session session)
 {
   entity.LaneNumber = session.LaneNumber;
   entity.ShooterId = session.ShooterId;
   entity.ProgramNumber = session.ProgramNumber;
   return entity;
 }
 public void Delete(Session session)
 {
   t_session entity = _sqlRepository.Find(_ => _.SessionId == session.SessionId).Single();
   _sqlRepository.Delete(entity);
 }
 public void Update(Session session)
 {
   t_session entity = _sqlRepository.Find(_ => _.SessionId == session.SessionId).Single();
   entity.UpdateEntity(session);
   _sqlRepository.Commit();
 }