Click here to Skip to main content
15,883,623 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am developing a new WPF application where mostly user inputs some data and output is shown based on that. I want to store the input data.

Input data contains
1 Image,
30 text stings

Can someone suggest me with the best database that I can use with some sample code.
Maciej Los 28-Oct-14 12:47pm    
I want to store the input data - where?

1 solution

You need to embrace separation of concerns. How can WPF be related to saving data? Data is one concern, UI is another one. And you really need to separate UI from other aspects of your programming system, as much as possible.

You can store data in many ways. First of all, with you minute volume of data, you can use a single file with serialization using XML, JSON or binary file for the media of your data. Please see:[^],[^].

In most cases, Data Contract is the best approach to serialization:[^],[^],[^].

Please see my past answers where I advocate this approach:
How can I utilize XML File streamwriter and reader in my form application?[^],
Creating property files...[^],
deseralize a json string array[^].

For a database, review these options:[^],[^].

Your choice depends on many factors, including costs, maintenance, and your own taste.

Share this answer
Member 11084466 28-Oct-14 12:47pm    
Thanks. My problem here is, I want to save the content present in my text box, close the application and after opening the application I want the data to be displayed in those text boxes. Also I want to save an Image along with the text box information in a single file. So please suggest me a good database type and also sample code if you have any.
Sergey Alexandrovich Kryukov 28-Oct-14 12:57pm    
I already answered. I would use only the serialization, but it's up to you.
Now, it's your turn. Choose one of the approaches and try to write your code, ask some follow-up question when (and if) you face problems.
Good luck.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900