I am using entity framework 5.0 to connect to database. I have added connection string in the app.config file and used the below code to get employee detail from the SQL Server database. But, when I try to access, I am getting the below error
The connection string 'SoftwareRequestContext' in the application's configuration file does not contain the required providerName attribute
Code used to retrieve the value from database.
using (SoftwareRequestContext context = new SoftwareRequestContext())
{
employee = context.Employee.Find(employeeNumber);
}
Connection string added in app.config
<connectionStrings>
<add name="SoftwareRequestContext" connectionString="Data Source=TestServer\SQLEXPRESS;Initial Catalog=SoftwareRequestWFDemo;Integrated Security=True" />
</connectionStrings>