public static EntrepriseModel formDTO(EntrepriseDTO address) { return(new EntrepriseModel { EntrepriseId = address.EntrepriseId, Name = address.Name, Tva = address.Tva, Contracts = address.Contracts.Select(c => ContractModel.formDTO(c)).ToList(), Entities = address.Entities.Select(e => EntityModel.formDTO(e)).ToList(), UpdatedDate = address.UpdatedDate, CreatedDate = address.CreatedDate, DeletedDate = address.DeletedDate, }); }
public static ContactModel formDTO(ContactDTO address) { return(new ContactModel { ContactId = address.ContactId, Contracts = address.Contracts.Select(c => ContractModel.formDTO(c)).ToList(), UpdatedDate = address.UpdatedDate, CreatedDate = address.CreatedDate, DeletedDate = address.DeletedDate, Address = AddressModel.formDTO(address.Address), FirstName = address.FirstName, LastName = address.LastName }); }