Hans Karlsen (talk | contribs) (Created page with "The central communication between a MDriven application and its Remote Persistence Layer is handled by PersistenceProvider. During the many iterations of development this has...") |
Hans Karlsen (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
To use WebAPI communication instead of WCF you use the new PersistenceMapperWEBAPIClient (MDriven.Net.Http.dll) instead of PersistenceMapperWCFClient. And on the server you subclass the public abstract class MDrivenPersistenceController<T> : ApiController (MDriven.Persistence.WebApi.dll). | To use WebAPI communication instead of WCF you use the new PersistenceMapperWEBAPIClient (MDriven.Net.Http.dll) instead of PersistenceMapperWCFClient. And on the server you subclass the public abstract class MDrivenPersistenceController<T> : ApiController (MDriven.Persistence.WebApi.dll). | ||
=== How to switch from WCF to WebAPI === | |||
Suppose you have this now: | |||
yourEcoSpace.PersistenceMapper = persistenceMapperWCFClient; | |||
persistenceMapperWCFClient.Uri = "<nowiki>https://YourServerMDrivenServer/APP_A0/A0_PMPWCF.svc</nowiki>"; | |||
persistenceMapperWCFClient.WCFServerUserName="SomeMDrivenServerUser" | |||
persistenceMapperWCFClient.WCFServerPassword="**********"; | |||
All you have to do in order to use WebApi instead of WCF is to create an instance of PersistenceMapperWEBAPIClient instead and go like this | |||
yourEcoSpace.PersistenceMapper = persistenceMapperWEBAPIClient; | |||
persistenceMapperWEBAPIClient.Uri = "<nowiki>https://YourServerMDrivenServer/api/A0_WebApi</nowiki>"; | |||
persistenceMapperWEBAPIClient.ServerUserName="SomeMDrivenServerUser" | |||
persistenceMapperWEBAPIClient.ServerPassword="**********"; |
Revision as of 09:21, 24 December 2019
The central communication between a MDriven application and its Remote Persistence Layer is handled by PersistenceProvider. During the many iterations of development this has been implemented with RPC, WCF(until recently the current) and the new implementation is WebApi.
To use WebAPI communication instead of WCF you use the new PersistenceMapperWEBAPIClient (MDriven.Net.Http.dll) instead of PersistenceMapperWCFClient. And on the server you subclass the public abstract class MDrivenPersistenceController<T> : ApiController (MDriven.Persistence.WebApi.dll).
How to switch from WCF to WebAPI
Suppose you have this now:
yourEcoSpace.PersistenceMapper = persistenceMapperWCFClient; persistenceMapperWCFClient.Uri = "https://YourServerMDrivenServer/APP_A0/A0_PMPWCF.svc"; persistenceMapperWCFClient.WCFServerUserName="SomeMDrivenServerUser" persistenceMapperWCFClient.WCFServerPassword="**********";
All you have to do in order to use WebApi instead of WCF is to create an instance of PersistenceMapperWEBAPIClient instead and go like this
yourEcoSpace.PersistenceMapper = persistenceMapperWEBAPIClient; persistenceMapperWEBAPIClient.Uri = "https://YourServerMDrivenServer/api/A0_WebApi"; persistenceMapperWEBAPIClient.ServerUserName="SomeMDrivenServerUser" persistenceMapperWEBAPIClient.ServerPassword="**********";