I'm created windows service where I have problem in calling query using entity frame-work inside this service, its always return null.
I tried to reinstall entity-framework package from NuGet but nothing happend.
this is my app.config file part:
<add name="GPSContext" connectionString="data source=server_name;initial catalog=dbName;user id=username;password=****;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
and (
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.
) run time error returned when I configured my entity-framework:
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>