My MyModel.edmx is in the assembly DataAccess.dll. This assembly is referenced in my web project (C#)
My entity connection string is the problem.
This is what I copied from app.config to my win.config:
<add name="MyModelEntities" connectionString="metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;provider=System.Data.SqlClient;provider connection string="data source=xxx;initial catalog=xxx;persist security info=True;user id=xxx;password=xxx;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
The problem is I am getting error that metadata source can't be loaded.
I am sure that my model name is correct. I have checked dll with Reflector.
So, I am thinking I should include my dll into connection string, and I tried this
<add name="MyModelEntities" connectionString="metadata=res://DataAccess.dll/MyModel.csdl|res://DataAccess.dll/MyModel.ssdl|res://DataAccess.dll/MyModel.msl;provider=System.Data.SqlClient;provider connection string="data source=xxx;initial catalog=xxx;persist security info=True;user id=xxx;password=xxx;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
But I am getting error that DataAccess.dll can't be find in list of assemblies enumerations.
Is there any way to reference my model inside dll directly. And my dll is not strongly named dll.
Any help is appreciated.
Thanks