public static ContractDTO toDTO(ContractModel entity)
 {
     return(new ContractDTO
     {
         ContactId = entity.ContactId,
         ContractType = enumToDTO(entity.ContractType),
         EntrepriseId = entity.EntrepriseId,
         TVA = entity.TVA,
         UpdatedDate = entity.UpdatedDate,
         CreatedDate = entity.CreatedDate,
         DeletedDate = entity.DeletedDate
     });
 }
 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,
     });
 }
Ejemplo n.º 3
0
 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
     });
 }
 public static EntrepriseDTO toDTO(EntrepriseModel entity)
 {
     return(new EntrepriseDTO
     {
         EntrepriseId = entity.EntrepriseId,
         Name = entity.Name,
         Tva = entity.Tva,
         Contracts = entity.Contracts.Select(c => ContractModel.toDTO(c)).ToList(),
         Entities = entity.Entities.Select(e => EntityModel.toDTO(e)).ToList(),
         UpdatedDate = entity.UpdatedDate,
         CreatedDate = entity.CreatedDate,
         DeletedDate = entity.DeletedDate,
     });
 }
Ejemplo n.º 5
0
 public static ContactDTO toDTO(ContactModel entity)
 {
     return(new ContactDTO
     {
         ContactId = entity.ContactId,
         Contracts = entity.Contracts.Select(c => ContractModel.toDTO(c)).ToList(),
         UpdatedDate = entity.UpdatedDate,
         CreatedDate = entity.CreatedDate,
         DeletedDate = entity.DeletedDate,
         Address = AddressModel.toDTO(entity.Address),
         FirstName = entity.FirstName,
         LastName = entity.LastName
     });
 }