public void AddBuyer(Buyer buyer) { if (buyer == null) { throw new ArgumentNullException(nameof(buyer)); } var currentBuyer = _buyerRepository.GetById(buyer.Id); if (currentBuyer != null) { throw new Exception("Buyer already exist."); } currentBuyer.Name = "joao"; buyer.AddContact(new Contact() { Description = "michel" }); _buyerRepository.Add(buyer); _unityOfWork.Commit(); }