Base solution for your next web application
Open Closed

Dependency Injection Mobile Application #9656


User avatar
0
devinedon created

Version 9.0.1 - NET Core 3.1, Angular

Hey, so I have an application service that I am already using on the web app - DeviceAppService. This is defined as per instruction within the Application project. The web application is using it well to retrieve device data from the backend (cosmosdb, IoT hub and SQL). In other words as far as I can see dependency injection works very well here using nswag to generate proxies and hence use them within the frontend

However, when used within a viewmodel (or code behind) in the mobile application I get the following error :

BindingContext of views must inherit XamarinViewModel. Given view's BindingContext is not like that: SynapWare.Views.DeviceMapView'

I created proxydeviceappservice within Application.Client hoping this would resolve it.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It turns out that the problem is app service name must be ProxyDevicesAppService instead of ProxyDeviceAppService.