/// <summary> /// Converts this instance of <see cref="AssetTypeAsset"/> to an instance of <see cref="AssetTypeAssetDTO"/>. /// </summary> /// <param name="entity"><see cref="AssetTypeAsset"/> to convert.</param> public static AssetTypeAssetDTO ToDTO(this AssetTypeAsset entity) { if (entity == null) { return(null); } var dto = new AssetTypeAssetDTO(); dto.AssetTypeID = entity.AssetTypeID; dto.AssetID = entity.AssetID; dto.CreatedByUserID = entity.CreatedByUserID; dto.CreatedDate = entity.CreatedDate; dto.ModifiedByUserID = entity.ModifiedByUserID; dto.ModifiedDate = entity.ModifiedDate; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="AssetTypeAssetDTO"/> to an instance of <see cref="AssetTypeAsset"/>. /// </summary> /// <param name="dto"><see cref="AssetTypeAssetDTO"/> to convert.</param> public static AssetTypeAsset ToEntity(this AssetTypeAssetDTO dto) { if (dto == null) { return(null); } var entity = new AssetTypeAsset(); entity.AssetTypeID = dto.AssetTypeID; entity.AssetID = dto.AssetID; entity.CreatedByUserID = dto.CreatedByUserID; entity.CreatedDate = dto.CreatedDate; entity.ModifiedByUserID = dto.ModifiedByUserID; entity.ModifiedDate = dto.ModifiedDate; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="AssetTypeAsset"/> converted from <see cref="AssetTypeAssetDTO"/>.</param> static partial void OnEntity(this AssetTypeAssetDTO dto, AssetTypeAsset entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="AssetTypeAssetDTO"/> converted from <see cref="AssetTypeAsset"/>.</param> static partial void OnDTO(this AssetTypeAsset entity, AssetTypeAssetDTO dto);