public void Create(Invoice invoice) { SoldProductModel soldProductModel = new SoldProductModel(); Id = invoice.Id; AcessKey = invoice.AcessKey; IssueDate = invoice.IssueDate; EntryDate = invoice.EntryDate; Addressee = new AddresseeModel(); Addressee.Create(invoice.Addressee); Issuer = new IssuerModel(); Issuer.Create(invoice.Issuer); Tax = new InvoiceTaxModel(); Tax.Create(invoice.InvoiceTax); OperationNature = invoice.OperationNature; Products = new List <SoldProductModel>(); Products = soldProductModel.CreateList(invoice.SoldProducts); if (invoice.ShippingCompany != null) { ShippingCompany = new ShippingCompanyModel(); ShippingCompany.Create(invoice.ShippingCompany); } }