public void Delete(BllLot bllLot) { //Проверка на существование? IEnumerable<BllBid> bids = bidService.GetByPredicate(b => b.LotId == bllLot.Id).ToList(); foreach (var bid in bids) { bidService.Delete(bid); } lotRepository.Delete(bllLot.ToDalLot()); uow.Commit(); }
public BllLot Update(BllLot bllLot) { DalLot oldLot = lotRepository.Update(bllLot.ToDalLot()); uow.Commit(); return oldLot == null ? null : oldLot.ToBll(); }
public BllLot Create(BllLot bllLot) { BllLot newLot = lotRepository.Create(bllLot.ToDalLot()).ToBll(); uow.Commit(); return newLot; }