0

Could you please suggest some solution for the following query?

I am writing a WPF application which can read from an XML schema, and show a designer UI to the user.The user can use the designer to add data and save it as an XML instance. He can reopen the the XML instance and view/edit the instance in the designer.

I am following the MVVM pattern to implement this. I will be writing model classes for the XML elements and bind it to the designer view. A data access layer will be populating the data in the model classes. I am very curious to know if there is any easy to use readymade "XML to Data Objects" which I will use as my data access layer. This data access layer needs to be efficient enough to hold just one XML instance in the memory and handle the read/save of XML instance.

Also, please feel free to comment on the overall approach I am taking in this design. I feel like this is a bit over complicated design, but can't help it.

Jimmy
  • 3,224
  • 5
  • 29
  • 47

1 Answers1

2

The .NET Serializer will create the XML for you from you class. Here is a MSDN example You just have to serialize it and it will act as a file db. You can also use entity framework to do so. Here's a good StackOverflow question on it

Community
  • 1
  • 1
Philippe Lavoie
  • 2,583
  • 5
  • 25
  • 39