I have my .dll project which contains an Entity Framework database connection.
Now I am trying to use reference of this DLL in Azure function, without any success yet.
DLL throws an exception while creating my context object.
I have install Entity Framework in Azure function This is my package.json-
{
"frameworks": {
"net46":{
"dependencies": {
"EntityFramework": "6.1.3"
}
}
}
}
I followed some posts and came to know that we need to create partial class Azure function inheriting from DBContext which was auto generated in DLL project, so I added that as well.
A have added connection string in Azure Application settings as below and also changed connection string type from SQLServer to Custom -
metadata=res://*/Entities.csdl|res://*/Entities.ssdl|res://*/Entities.msl;provider=System.Data.SqlClient;provider connection string='data source=*****;initial catalog=*****;persist security info=True;user id=<user_id>;password=<password>;MultipleActiveResultSets=True;App=EntityFramework' providerName="System.Data.EntityClient"
Previously I was getting metadata keyword is not supported error and I fixed that somehow.
Now I am getting providerName attribute not found error on Azure function.
Any help will be appreciated.