Im creating an Application in visual studio for Home windows Phone Mango by which I want a dictionary database. I understand how to produce it, how you can place, update and remove.

I've got a 300k xml file of information which I wish to preload for the reason that database (parse and place - this isn't the issue) in to the application. However , I'd rather not get it done once the application is being installed. I would like the database file preinstalled within the isolated data storage. I additionally need that system on-board since the xml contents could change every 3 several weeks. But processing a 300k xml file on the phone - each time once the application is installed - sounds quite... stupid after i could make the database preinstalled...

PS. Can there be any decent XML assistants in linq? For caching xml files for instance..

This does not address your circumstances with XML assistants for Linq, but a great way to handle this really is to produce the database individually (as with a Console Application project) and load up using the data you'll need. Next, copy the SDF file to your Home windows Phone project as Content. Lastly, whenever you deploy the application, copy the database from the deployment location into isolated storage. This way, it's not necessary to cope with XML files, or anything like this. It's a straightforward matter copying in the deployment place to Isolated Storage. I'm focusing on a (quite lengthy) blog publish that talks about this, however the core code you'll need is:

// Obtain the virtual store for the application.
IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication();

// Create a stream for the file in the installation folder.
using (Stream input = Application.GetResourceStream(new Uri("ReferenceDB.sdf", UriKind.Relative)).Stream)
{
    // Create a stream for the new file in isolated storage.
    using (IsolatedStorageFileStream output = iso.CreateFile("ApplicationDB.sdf"))
    {
        // Initialize the buffer.
        byte[] readBuffer = new byte[4096];
        int bytesRead = -1;

        // Copy the file from the installation folder to isolated storage.
        while ((bytesRead = input.Read(readBuffer, 0, readBuffer.Length)) > 0)
        {
            output.Write(readBuffer, 0, bytesRead);
        }
    }
}

You'll be able to connect with the database normally and browseOrcreate data all day long lengthy:

var db = new MyDataContext("Data Source = 'isostore:/ApplicationDB.sdf';");

You are able to download some sample code from the GitHub repository at https://github.com/ChrisKoenig/ReferenceDatabase

-Chris