Saying honestly, not a very good solution, imho. Usually DTO is just a bunch of fields and should not contain some functionality. Handling all the logic in OnModelCreating looks fine and logical. So - since it's not possible to get new data straight from update object - I think I will have to re-read the entity.
OK, thanks, now I know the property values not changed, but parameter values instead. But what do you mean by DTO normalization? Carry on some operations on DTOs? But if so - it's easier just to re-read the entity to get correct up-to-date values.
I see now... But is dotnet-ef tool the same thing as Microsoft.EntityFrameworkCore.Tools package? So basically I can use PM commands add-migration / script-migration -from 0 and so on instead? I just need to leave only ABP-related tables inside CentralToolsMigrationsDbContext.OnModelCreating method.
I've tried that (I used EntityFrameworkCore project as a base and added the Microsoft.EntityFrameworkCore.Design reference as asked by the tool). After running migration tool, I'm getting
Unable to create an object of type 'XXXXDbContext' //this is the class inherited from AbpDbContext<XXXXDbContext>
I hope it will be easy... :) Step 1) Create a boilerplate project, as described in the abp doc; Step 2) Create the folder on a remote machine for publishing IdentityServer project, set it up as an IIS application under Default Web Site and assign a separate app pool to it: Step 3) Publish IdentityServer project to that remote machine using the publish profile as below (please replace XXX / YYY / ZZZ and some other dummy values with relevant values):
IdentityServer_to_RemoteMachine.pubxml
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<PublishProvider>AzureVirtualMachine</PublishProvider>
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://XXX.cloudapp.azure.com/YYY.IdentityServer</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>073c361e-b8f4-49f5-93cc-72a3ff49c026</ProjectGuid>
<MSDeployServiceURL>XXX.cloudapp.azure.com:8172</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site\YYY.IdentityServer</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>YOUR_USERNAME</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
IdentityServer_to_RemoteMachine.pubxml.user
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>YOUR_ENCRYPTEDPASSWORD</EncryptedPassword>
</PropertyGroup>
<ItemGroup>
<DestinationConnectionStrings Include="Default">
<Value>YOUR_CONNECTIONSTRING</Value>
</DestinationConnectionStrings>
</ItemGroup>
</Project>
Step 3) When the published IdentityServer website is being run, you (hopefully) will see the same broken UI as reported by me earlier;
I have not tried to deploy to local IIS server yet - in fact, it's even not set up, because we supposed to use remote DEV machine for running our backend. BTW, when I run this app via IIS Express - I can't see the 'Lepton.Global' bundle loading at all. I've tried to figure out what this bundle was about, playing around AbpBundlingOptions in my IdentityServerModule and hoping to override LeptonThemeBundles.Scripts.Global / LeptonThemeBundles.Styles.Global bundles - but seems like those are not bundle names...