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

            var dto = new AssetTypeHistoryDTO();

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

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

            var entity = new AssetTypeHistory();

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

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