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

            var dto = new emailDto();

            dto.i_EmailId = entity.i_EmailId;
            dto.v_Email   = entity.v_Email;

            entity.OnDTO(dto);

            return(dto);
        }
示例#2
0
        /// <summary>
        /// Converts this instance of <see cref="emailDto"/> to an instance of <see cref="email"/>.
        /// </summary>
        /// <param name="dto"><see cref="emailDto"/> to convert.</param>
        public static email ToEntity(this emailDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new email();

            entity.i_EmailId = dto.i_EmailId;
            entity.v_Email   = dto.v_Email;

            dto.OnEntity(entity);

            return(entity);
        }
示例#3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="email"/> converted from <see cref="emailDto"/>.</param>
 static partial void OnEntity(this emailDto dto, email entity);
示例#4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="emailDto"/> converted from <see cref="email"/>.</param>
 static partial void OnDTO(this email entity, emailDto dto);