示例#1
0
        public UserEmailDTO Update(UserEmailDTO oUserEmailDTO)
        {
            UserEmailDTO returnUserEmail = null;
            if (oUserEmailDTO != null && oUserEmailDTO.UserEmailID > 0)
            {
                oUserEmailRepo.UpdateUserEmail(0, UserEmailAssembler.ToEntity(oUserEmailDTO));
                returnUserEmail = oUserEmailDTO;
            }

            return returnUserEmail;
        }
示例#2
0
        /// <summary>
        /// Converts this instance of <see cref="UserEmail"/> to an instance of <see cref="UserEmailDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="UserEmail"/> to convert.</param>
        public static UserEmailDTO ToDTO(this UserEmail entity)
        {
            if (entity == null) return null;

            var dto = new UserEmailDTO();

            dto.UserEmailID = entity.UserEmailID;
            dto.UserID = entity.UserID;
            dto.EmailID = entity.EmailID;
            dto.IsPrimary = entity.IsPrimary;

            entity.OnDTO(dto);

            return dto;
        }
示例#3
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="UserEmailDTO"/> converted from <see cref="UserEmail"/>.</param>
 static partial void OnDTO(this UserEmail entity, UserEmailDTO dto);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="UserEmailDTO"/> converted from <see cref="UserEmail"/>.</param>
 static partial void OnDTO(this UserEmail entity, UserEmailDTO dto) {
     if (entity != null && entity.Email != null)
         dto.Email = EmailAssembler.ToDTO(entity.Email);
 }