Can we perhaps create a generalized file for the initialization of the DbContext and make it available globally? As that would be really helpful in the case when we have multiple functions?
Hi, For azure functions app, when developing in local we have to use "local.setting.json" file. All the setting in this file needs to be configured when we deploy the app to azure. There is no environment specific setting file for azure app. I hope I answered your question. Please let me know if you have any other questions. Happy coding!
@@learnsmartcoding what @mihirdoshi1403 probably meant is, instead of initializing the DbContext by using the "new" keyword, it makes more sense to inject it in the function class, using DI.
Can we perhaps create a generalized file for the initialization of the DbContext and make it available globally? As that would be really helpful in the case when we have multiple functions?
Hi, For azure functions app, when developing in local we have to use "local.setting.json" file. All the setting in this file needs to be configured when we deploy the app to azure. There is no environment specific setting file for azure app.
I hope I answered your question. Please let me know if you have any other questions.
Happy coding!
@@learnsmartcoding what @mihirdoshi1403 probably meant is, instead of initializing the DbContext by using the "new" keyword, it makes more sense to inject it in the function class, using DI.