none
linq to sql -> xml or similar RRS feed

  • Question

  •  

    Hi...

     

    I have a linq to sql project going, but i need to take the database offline for a presentation on my laptop. Is there anyway i can "convert" my db into a flatfile or something, so i dont need to install and create a db on my laptop?

    Friday, August 29, 2008 12:01 PM

Answers

  • LINQ to SQL only support SQL as a back-end so it won't allow XML or other file formats.

    If your database structure is quite simple, doesn't use stored procedures and is okay to start blank you could consider using the CreateDatabase method on the DataContext once you have SQL installed - a small edition like Express or Compact would be a lot less overhead.

    If you want to take the whole database and can take it off-line then using detach, copying the mdf/ldf and then re-attaching is a quick way to get a copy without having to script/backup. You may need to tweak the security config once you've done this to cope with the new local user/permissions.

    [)amien
    Friday, August 29, 2008 4:18 PM
    Moderator