Hi
I am currently developing some Azure functions (.Net 2.2, V2) and it's support for dependency injection is highly unstable (almost non-existant, atm). In addition, AspNetZero / ABP conventions will not apply to Azure functions.
In this scenario, I am forced to new up instances of app services, and perhaps domain services.
I would specifically like to find out how I can new up instances of Crud App Services and generic repositories?
Thanks
3 Answer(s)
-
0
Hi @mightyit
I don't have any experience with Azure Functions but you can create a custom implementation of CrudAppService and instantiate it.
But, it would be great if you can find a way to use DI in Azure Functions, otherwise it will be hard for you to use your app services.
You can try property injection as explained here https://devkimchi.com/2019/02/22/performing-constructor-injections-on-azure-functions-v2/
-
0
Oh fudge....
Thanks. That was pretty much the approach I was trying to avoid, as it now means that "generic" services which the AspNetZero / ABP framework provides out-of-the-box can not be used.
Also, I was trying to rely on DI for Azure Functions V2 - as you can see in that post it is still very unstable.
Appreciate the input!
-
0
Thanks for the feedback. We will try to better integrate AspNet Zero with Azure in the future.