add name="FormsEntities2" connectionString="Data Source=hostname;Initial Catalog=database name;User ID=username;Password=password;" providerName="System.Data.SqlClient"
"Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)