Sorry. I am new to SQL CE and MVVM pattern. I am still not sure how to properly use the toolbox when the __VERSION table is included in the DB. Let's say I have a table named CATEGORY and the __VERSION table in my DB. I added a new col to the CATEGORY table named IsFavorite and I need to update the DataContext and Class files in my project. I went to the Compact Toolbox and selected Add DataContext to current project. A window poped up stating there is no PK on the __VERSION table and will not be generated properly. Hit OK. Choose the options Pluralize and Create a file per Table. The DataContext and class file in my project got updated. I see the following entry in my DataContext
public System.Data.Linq.Table<@__VERSION> @__VERSIONs
{
get
{
return this.GetTable<@__VERSION>();
}
}
The above code has error. The error indicates Unknown Type '__VERSION'. Is this just a matter of removing the above entries from the DataContext since __VERSION is an internal table? Is the tool supposed to add the above entry? or am I using the tool incorrectly? I am using the Compact Toolbox version 2.6.0.4 installed through the VS 2010 Extension Manager. I have attached a sample that I put together. The datacontext is already broken.
Comments: ** Comment from web user: ErikEJ **
public System.Data.Linq.Table<@__VERSION> @__VERSIONs
{
get
{
return this.GetTable<@__VERSION>();
}
}
The above code has error. The error indicates Unknown Type '__VERSION'. Is this just a matter of removing the above entries from the DataContext since __VERSION is an internal table? Is the tool supposed to add the above entry? or am I using the tool incorrectly? I am using the Compact Toolbox version 2.6.0.4 installed through the VS 2010 Extension Manager. I have attached a sample that I put together. The datacontext is already broken.
Comments: ** Comment from web user: ErikEJ **
You are using split files + pluralization, which causes the code to remove the @__VERSION table from the DataContext to fail - it will be fixed in next release - workaround is to remove the reference to @__VERSION in the DataContext class manually for now.