v0.8.1
#602
Replies: 1 comment
-
Thank you @Mimetis for providing this fix. We can only test internally as the last beta frightened the horses. But so far it's looking good. We'll have to wait for the horses to settle before we run another beta. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
v0.8.1
is in progress dev.You can grab the pre-release here : https://www.nuget.org/packages?q=Dotmim.Sync
Upgrade to version v0.8.1
Do not forget to call the
UpgradeAsync
method to upgrade your current schema version the last version.UpgradeAsync
, since it's handled by default byDMS
RemoteOrchestrator
with the correctSyncSetup
and call theUpgradeAsync
methodWhen making the upgrade of your system (server / clients), be sure to remember that:
That being said, be sure to firstly upgrade your server to the last version, call the
UpgradeAsync
(as explained before), then upgrade your clients.Once upgraded your schema should be updated to the last version
Breaking Changes
A new way of handling web server controller has been implemented.
I've removed all the server cache usages, and replace them with the client session.
Instead of relying on
IMemoryCache
, the Web Api is using now theISession
to stick all the httpclient call and be sure there is no collision.I've removed the
WebServerManager
instance, and I'm injecting directly aWebServerOrchestrator
in the pipeline.Be careful, the code on the controller is slightly different (see example below)
Since we are using now the session, you need to add the session service and middleware.
See here for more info : https://docs.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-5.0#configure-session-state.
Sample 1: Simple orchestrator injected
Here is the new version of the
Startup.cs
fileStartup.cs:
Be careful, order is important here :
UseSession
is AFTERUseRouting
andUseAuthorization
and BEFOREUseEndpoints
Here is the new version of
SyncController
.As you can see we are injecting directly a
WebServerOrchestrator
instead of the oldWebServerManager
.SyncController.cs:
Sample 2: Multi orchestrators injected
You may need to add multiples orchestrators. The code is slightly the same, and we are now relying on the core methods of the ASP.Net Core Dependency Injection mechanism
Here, we are injecting two kind of orchestrators.
SqlServerScope
MySqlScope
In the controller, we can inject an
IEnumerable<WebServerOrchestrator>
, instead of a single instance ofWebServerOrchestrator
:Beta Was this translation helpful? Give feedback.
All reactions