Esempio n. 1
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="BusinessDTO"/> converted from <see cref="Business"/>.</param>
 static partial void OnDTO(this Business entity, BusinessDTO dto)
 {
     if (entity.BusinessAddresses != null && entity.BusinessAddresses.Count > 0)
     {
         dto.BusinessAddresses = BusinessAddressAssembler.ToDTOs(entity.BusinessAddresses.ToList());
     }
     if (entity.BusinessEmails != null && entity.BusinessEmails.Count > 0)
     {
         dto.BusinessEmails = BusinessEmailAssembler.ToDTOs(entity.BusinessEmails);
     }
     if (entity.BusinessImages != null && entity.BusinessImages.Count > 0)
     {
         dto.BusinessImages = BusinessImageAssembler.ToDTOs(entity.BusinessImages);
     }
     if (entity.Achievements != null && entity.Achievements.Count > 0)
     {
         dto.Achievements = AchievementAssembler.ToDTOs(entity.Achievements);
     }
     if (entity.BusinessImages != null && entity.BusinessImages.Count > 0)
     {
         dto.BusinessImages = BusinessImageAssembler.ToDTOs(entity.BusinessImages);
     }
     if (entity.BusinessPhones != null && entity.BusinessPhones.Count > 0)
     {
         dto.BusinessPhones = BusinessPhoneAssembler.ToDTOs(entity.BusinessPhones);
     }
 }
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="UserDTO"/> converted from <see cref="User"/>.</param>
 static partial void OnDTO(this User entity, UserDTO dto)
 {
     if (entity.UserAddresses != null && entity.UserAddresses.Count > 0)
     {
         dto.UserAddresses = UserAddressAssembler.ToDTOs(entity.UserAddresses.ToList());
     }
     if (entity.UserEmails != null && entity.UserEmails.Count > 0)
     {
         dto.UserEmails = UserEmailAssembler.ToDTOs(entity.UserEmails);
     }
     if (entity.Experiences != null && entity.Experiences.Count > 0)
     {
         dto.Experiences = ExperienceAssembler.ToDTOs(entity.Experiences.ToList());
     }
     if (entity.Achievements != null && entity.Achievements.Count > 0)
     {
         dto.Achievements = AchievementAssembler.ToDTOs(entity.Achievements);
     }
     if (entity.Educations != null && entity.Educations.Count > 0)
     {
         dto.Educations = EducationAssembler.ToDTOs(entity.Educations);
     }
     if (entity.Skills != null && entity.Skills.Count > 0)
     {
         dto.Skills = SkillAssembler.ToDTOs(entity.Skills);
     }
     if (entity.Languages != null && entity.Languages.Count > 0)
     {
         dto.Languages = LanguageAssembler.ToDTOs(entity.Languages);
     }
     if (entity.UserImages != null && entity.UserImages.Count > 0)
     {
         dto.UserImages = UserImageAssembler.ToDTOs(entity.UserImages);
     }
     if (entity.UserPhones != null && entity.UserPhones.Count > 0)
     {
         dto.UserPhone = UserPhoneAssembler.ToDTOs(entity.UserPhones);
     }
 }