Local Database in Silverlight
I want to integrate a local database into Windows Phone 7 project. The DB should be allready filled with values from manual input. Therefore I use a wizard to create a local Database in WPF. I can create tables, set their values and fill in them, but I could not开发者_JAVA百科 find the way how to refere columns from different tables.
Is it possible using UI wizard in Visual Studio or only possible by coding the datacontext?
It is possible what you ask and the easiest way to do it is Linq to Sql.
Database Management in Mango
There is an easier way to do it but i think ms doesn't support that, you create a new windows WPF project and there you add a LinQ to SQL database model there you can create your database and then just copy it to your wp7 project and include it in the solution.
Then you will have to comment out or delete the two constructors which are not supported by the WP7 and your are ready to use your database.
The two constructors to comment out use System.Data.IDbConnection connection
This solution is explained in detail in Corrado's Blog
精彩评论