I'm trying to create a WP7 application using MVVM Light and SQL Server CE as a database. To accomplish this I generated a datacontext using sqlmetal.exe (1).
This works ok if I run the application on my phone. But when trying to display design time data, I can't create an instance of the DataContext
in my design time code. Can this be done? Another way I tried was to create an instance of Table<MyDataObject>
, but System.Data.Linq.Table has no constructors.
So my question is if it is possible to somehow create an instance of my DataContext
from code or that there is another way to interface with my database without loosing design time data.
(1) Actually I used a different method using a library project to be able to visually design and copied the designer file to my WP7 project. The result in the same if I'm correct.