Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local storage layer for Entity Framework?

I've been implementing a SQLServer 2005 backed EF solution for the business app I'm working on, and It's been working out fine.

I'm encountering a problem in that I want to allow the user to work without a database at all while using the same entities.

I don't want to go to local databases for portability reasons. Also, it's easy to send a small database over email if it's just an XML file.

So, I know that a DataSet could be stored, and loaded from a XML file, schema and all. Is there some way to use one (or two, or three) XML files as the storage layer of EF?

Since Entity Framework is built on top of ADO.Net, I was expecting there to be a XML Data Provider of sorts. Then, the Entity Model could be made to run of an XML file. I came upon the DataSet designer which allowed me to create the schema and save and load from a XML file, but it doesn't slot into EF, since EF uses Object Services instead of DataSet (correct me if I'm wrong. I read it here at MSDN).

I did come across the WilsonXmlDbClient library, which is supposed to be a XML DataProvider for ADO.Net. It seems old, and I don't really know where to start with it.

I know that XML is not anyone's first choice for storing relational data, however, I' m looking to be working with files 1Mb or smaller.

TIA

like image 642
biozinc Avatar asked Nov 06 '22 22:11

biozinc


1 Answers

One way to do this would be to use Microsofts sync framework. http://msdn.microsoft.com/en-us/sync/default.

You would then use SQL Server express or Compact Edition on the client.

The sync framework and the SQL Server Express and Compact editions are free.

like image 71
Shiraz Bhaiji Avatar answered Nov 15 '22 11:11

Shiraz Bhaiji