Apr 13, 2009 at 7:20 PM
It seems that the datacontext generated for a SQL compact database does not have a parameterless constructor. How can I use the DatabaseIndexSet<T> class since it requires one? I would prefer not to have to change generated code.
Apr 14, 2009 at 3:17 AM
Hi Mika76,

You can just remove the new() constraint on TDataContext. It was originally there because we were debating about how to recycle data contexts.
We had a long discussion about how to recycle data Contexts


Apr 14, 2009 at 3:18 AM
Also, you shouldn't need to change generated code.
Because you can extend Your DbDataContext with partial classes and add a parameterless constructor there.

What are the arguments for the DbdataContext ctor in compact sql?
Apr 14, 2009 at 3:19 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.