Esempio n. 1
0
 private static void AddDependencies(UnitOfWork unitOfWork, Car item, int carId)
 {
     foreach (var itm in item.Damages)
     {
         itm.CarId = carId;
         Damages.AddNew(itm, unitOfWork);
     }
     foreach (var rent in item.Rents)
     {
         rent.CarId = carId;
         Rents.AddNew(rent, unitOfWork);
     }
 }
Esempio n. 2
0
 private static void AddDependencies(UnitOfWork unitOfWork, Order item, DB.Orders dbItem)
 {
     foreach (var itm in item.Damages)
     {
         var did = Damages.AddNew(itm, unitOfWork, true);
         itm.Id = did;
         OrderDamages.AddNew(itm, dbItem, unitOfWork);
     }
     foreach (var serv in item.Services)
     {
         OrderServices.AddNew(serv, dbItem, unitOfWork);
     }
 }