If I have a table in my database called \'Users\', there will be a class generated by LINQtoSQL called \'User\' with an already declared empty constructor.
What is t
The default constructor which is generated by the O/R-Designer, calls a partial function called OnCreated - so the best practice is not to override the default constructor, but instead implement the partial function OnCreated in MyDataClasses.cs to initialize items:
partial void OnCreated()
{
Name = "";
}
If you are implementing other constructors, always take care to call the default constructor so the classes will be initialized properly - for example entitysets (relations) are constructed in the default constructor.