Project Description
This project implements a Isolated Storage (IsolatedStorage) based database for Windows Phone 7. The database consists of table object, each one supporting any number of columns. Use this as persistance engine for WIndows Phone 7 Silverlight (and XNA) applications.


This project is currently in setup mode and only available to project coordinators and developers. Once you have finished setting up your project you can publish it to make it available to all CodePlex visitors.

This project implements a Isolated Storage for Silverlight (IsolatedStorage) based database for Windows Phone 7. The usage of this software is very simple. You create a new database by calling CreateDatabase. You can add tables to the database by calling db.CreateTable<T> where T is the type of entity to be stored in table rows. You can save database by calling Save, and open the database by calling OpenDatabase. This database supports version changes, so you can update your application and still be able to open the database. You can look for basic use of this database by examining test Silverlight application. Encryption has been implemented; just provide a password to use encryption. Also lazy loading has been implemented. If you open database with lazy loading flag, tables will be loaded when first accessed. Feel free to look documentation help file under current download for API details. The source code file contains unit test project that you can also examine for usage details. The database consists of table objects, each one supporting any number of columns. There is full Linq support implemented in the database. There is also ability delete and add data in batches. There is also support to cancel pending changes.


New features was added in the latest (RTM) release - ability to create a data for a table on the desktop, include it in phone application, load it when your application runs and save at that point. I included a console application in the solution that create such file (test.xml). Then I include this file in my sample phone application and flag it as content to improve load time. Then at run time, I create new DB if it does not exist, read the content of the file into a string using GetResourceStream, then call CreateNewTable for my new database and pass the string with table data into it. You can see this full implementation in unit test application – just look at CreateTableFromXml method.

New feature added on 10/23/2010 - add ability to save database or a table asynchronously. The method is called BeginSave and take single parameter - callback function that allows to check for errors during save process.

New feature added on 08/21/2011 - add ability to create named tables and check for table existence. Check out the write up at http://dotnetspeak.com/index.php/2011/08/update-for-wp7-database/

Check the Quick Start guide at http://dotnetspeak.com/index.php/2011/02/quick-start-guide-for-windows-phone-7-database/
Also, check out documentation for the API on the main download page. It is available as part of main release.

Last edited Aug 21, 2011 at 4:48 PM by SergeyBarskiy, version 11