public void Update(Shot shot) { t_shot entity = _sqlRepository.Find(_ => _.ShotId == shot.ShotId).Single(); entity.UpdateEntity(shot); _sqlRepository.Commit(); }
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); }
public void Delete(Shot shot) { t_shot entity = _sqlRepository.Find(_ => _.ShotId == shot.ShotId).Single(); _sqlRepository.Delete(entity); }