public bool RemoveOffert([FromBody] Offer offer) { bool updated = _ProductItemRepo.RemoveOffert(offer); if (updated) { var prodtoUpdate = _ProductItemRepo.Get(offer.MyProductId); prodtoUpdate.Price = (float)prodtoUpdate.RealPrice; prodtoUpdate.RealPrice = 0; _ProductItemRepo.Update(prodtoUpdate); } return(updated); }