public void Update(CollectionShooter collectionShooter) { t_collectionshooter entity = _sqlRepository.Find(_ => _.CollectionShooterId == collectionShooter.CollectionShooterId).Single(); entity.UpdateEntity(collectionShooter); _sqlRepository.Commit(); }
public void Create(CollectionShooter shooter) { t_collectionshooter entity = new t_collectionshooter(); entity.UpdateEntity(shooter); _sqlRepository.Insert(entity); shooter.CollectionShooterId = entity.CollectionShooterId; }
public void Delete(CollectionShooter collectionShooter) { t_collectionshooter entity = _sqlRepository.Find(_ => _.CollectionShooterId == collectionShooter.CollectionShooterId).Single(); _sqlRepository.Delete(entity); }
public static t_collectionshooter UpdateEntity(this t_collectionshooter entity, CollectionShooter shooter) { entity.ShooterId = shooter.ShooterId; entity.ShooterCollectionId = shooter.ShooterCollectionId; return(entity); }