I am creating a program that has two options: an offline as well as an online storage option. The internet stuff is not an issue, never continues to be and most likely won't be. To create things a bit more simple, I'm while using Entity Framework with my online database to complete all my CRUD.
The offline choice is where I am getting an issue. I attempted adding a nearby SQL install included in the install package, however it was failing on certain computer systems based upon which version of SQL I had been using, many people just could not do the installation whatsoever... honestly, I'd rather not go using that simply to get individuals to install this program. I wish to do a couple of things:
1) Keep data. I am presently thinking Linq to XML is my best choice without a penny extra to set up, but can there be in whatever way to map the organizations to classes inside the program that will take proper care of the XML CRUD?
2) Sync the information. I am thinking I'll make use of the Sync Framework, however, without any normal database without anyone's knowledge, it's a little of the discomfort.
Any help/advice/comments very welcome, if there is a much simpler method of doing all of this, please tell me. Thanks!
I am glad to listen to you have something determined for that syncing logic. This is the bit that will keep me up during the night.
GUIDs are the friend in times such as this.
And I have never tried to use 1
ObjectContext specific at different datasources. You may can accomplish something clever using
OLEDB as the provider. I'd go just a little lower that road. However I suspect you will find it's more trouble than it's worth.
I suggest following a Repository Pattern. You'll be able to just implement a
XMLRepository along with a
SQLRepository. This might mean some borderline double coding. But queries against
XML versus a database get their own concerns. So, based on your specifics, I believe breaking the DRY principle might be justified.
Also, and that i acknowledge this really is completely subjective, it strikes me the Entity Framework is overkill for any relational model that may be easily endured in XML. I am just curious should you considered using LINQ-to-SQL. And when so, what convinced you to definitely go the clear way of EF?