コード例 #1
0
 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,
     });
 }
コード例 #2
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
     });
 }