/// <summary>
        /// Converts this instance of <see cref="servicecomponentmultimedia"/> to an instance of <see cref="servicecomponentmultimediaDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="servicecomponentmultimedia"/> to convert.</param>
        public static servicecomponentmultimediaDto ToDTO(this servicecomponentmultimedia entity)
        {
            if (entity == null) return null;

            var dto = new servicecomponentmultimediaDto();

            dto.v_ServiceComponentMultimediaId = entity.v_ServiceComponentMultimediaId;
            dto.v_ServiceComponentId = entity.v_ServiceComponentId;
            dto.v_MultimediaFileId = entity.v_MultimediaFileId;
            dto.v_Comment = entity.v_Comment;
            dto.i_IsDeleted = entity.i_IsDeleted;
            dto.i_InsertUserId = entity.i_InsertUserId;
            dto.d_InsertDate = entity.d_InsertDate;
            dto.i_UpdateUserId = entity.i_UpdateUserId;
            dto.d_UpdateDate = entity.d_UpdateDate;

            entity.OnDTO(dto);

            return dto;
        }
        /// <summary>
        /// Converts this instance of <see cref="servicecomponentmultimediaDto"/> to an instance of <see cref="servicecomponentmultimedia"/>.
        /// </summary>
        /// <param name="dto"><see cref="servicecomponentmultimediaDto"/> to convert.</param>
        public static servicecomponentmultimedia ToEntity(this servicecomponentmultimediaDto dto)
        {
            if (dto == null) return null;

            var entity = new servicecomponentmultimedia();

            entity.v_ServiceComponentMultimediaId = dto.v_ServiceComponentMultimediaId;
            entity.v_ServiceComponentId = dto.v_ServiceComponentId;
            entity.v_MultimediaFileId = dto.v_MultimediaFileId;
            entity.v_Comment = dto.v_Comment;
            entity.i_IsDeleted = dto.i_IsDeleted;
            entity.i_InsertUserId = dto.i_InsertUserId;
            entity.d_InsertDate = dto.d_InsertDate;
            entity.i_UpdateUserId = dto.i_UpdateUserId;
            entity.d_UpdateDate = dto.d_UpdateDate;

            dto.OnEntity(entity);

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