I have a connection string defined in my web.config like:
<connectionStrings>
<add name="LibraryConnectionString" connectionString="Server=.\SQLEXPRESS3;Database=Library;Integrated Security=true" />
Well…lI do not understand why when i drag-and-drop tables into a new DataClasses dbml it does not construct a default constructor specifying the connection string….
I only have constructor with params like:
public DataClassesDataContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
I do need a default constructor for LinqDataSource..
Can anyone suggest a work-around?
Thanks
You can make a default constructor in a separate file like this:
Make sure not to call
OnCreatedtwice.