I want to implement a WCF service with a proxy. The service and proxy are situated in 2 different projects. The entityFramework is in the Service project. And in the proxy's app.config I put the connection string as below:
<add name="foodOrderEntities" connectionString="metadata=res://*/foodOrderEF.csdl|res://*/foodOrderEF.ssdl|res://*/foodOrderEF.msl;provider=System.Data.SqlClient;
provider connection string="data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|\foodOrder.mdf;integrated security=True;connect timeout=30;
MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
But when I try to invoke the method with the service test client I get the following exception: @"The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information."
Please anyone could tell me how can I set up the connection string in such a way that the proxy project serviceHost can access the database successfully? Or do I need to crate another project independently for the EF object and then add reference?