2. Open up your DBML and click the designer service. Expand the Connection property, delete Connection String and set "Application Settings" to False.
3. Open designer file and add new construtor as:
public DataClassesDataContext()
: base(ConfigurationManager.ConnectionStrings["ConnectionStringName"].ConnectionString)
{
OnCreated();
}
4. Enjoy!
Full article and inspiration exist here.
No comments:
Post a Comment