Hi Guys, Love your work, I have been building DDD frameworks myself but you've done a really great job! My client needs to use WebAPI for WPF/Xamarin apps. So I wanted to use your DynamicApiControllerBuilder to create these services from the applications and then to just resolve them in c# code on the client WPF/Xamarin side.
So I need the WPF module to dependon the ReadyCareWebApiModule [DependsOn(typeof(ReadyCareDataModule), typeof(ReadyCareApplicationModule), typeof(ReadyCareWebApiModule))] public class ReadyCareWpfModule : AbpModule
Then it looks like I can use the AbpHttpControllerSelector. SelectController mehod to get the controller i.e This method public override HttpControllerDescriptor SelectController(HttpRequestMessage request)
Then I can use the ExecuteAsync on the HttpControllerDescriptor to execute an action on the controller?
Of course we would do appropriate caching as required.
Alternatively should I write the webapi methods by hand and just call the application methods in there, but thats what we don't want to have to do right.
Best Regards, Alistair
2 Answer(s)
-
0
I made another post on this topic but it hasn't been approved yet, lets wait for that.
Best Regards, Alistair
-
0
Hi,
I'm sorry but I couldn't understand your needs :) You want to expose your app services with dynamic web api and consume it from a WPF app? Right? If so, no problem since Web API can be consumed from C#. Also, we have a IAbpWebApiClient that can make easier to call remote dynamic web APIs from your WPF app. Example usage: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/ConsoleRemoteWebApiCall">https://github.com/aspnetboilerplate/as ... WebApiCall</a>