In my database I have a table called StaffMembers
when I bring this into my .net Project as through linq-to-sql an entity class StaffMember is created
Now I have
Alright I found my answer on http://social.msdn.microsoft.com/Forums/en/linqprojectgeneral/thread/0cf1fccb-6398-4f16-920b-adef9dc4ac9f
in case some is still looking for an answer.
This problem happens when you overload the constructor in the partial class, and not call the default constructor in it.
The default constructor of the entity does few things thats required by the Context object.
Hence if you have an overloading constructor in your partial class and using it to create the object, make sure the default constructor is called in the first line
in C# you can do this by
eg.
Customer(string custID)
you need to add a
Customer(string custID):this()
in C# where Customer is my class and Customer(string custID):this() is my overload constructor in my partial class.