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

            var dto = new AssetTypeAssetHistoryDTO();

            dto.ID               = entity.ID;
            dto.AssetTypeID      = entity.AssetTypeID;
            dto.AssetID          = entity.AssetID;
            dto.ModifiedByUserID = entity.ModifiedByUserID;
            dto.ModifiedDate     = entity.ModifiedDate;
            dto.AuditDate        = entity.AuditDate;
            entity.OnDTO(dto);

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

            var entity = new AssetTypeAssetHistory();

            entity.ID               = dto.ID;
            entity.AssetTypeID      = dto.AssetTypeID;
            entity.AssetID          = dto.AssetID;
            entity.ModifiedByUserID = dto.ModifiedByUserID;
            entity.ModifiedDate     = dto.ModifiedDate;
            entity.AuditDate        = dto.AuditDate;
            dto.OnEntity(entity);

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