My application is something similar to a Contact Manager. Let's say a user can enter contacts with their addresses. I have the code and technology to save my contacts to a file. But where do I save that file?
Considering this is a .NET application running on Windows. Should my file end up in the AppData of the users folder? Should I use the Isolated Storage (as mentioned here)? Something else? What's the recommended practice?
I ended up using the solution Patrick suggested:
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
You have a number of options; as you say, Isolated Storage is one of them. You could also use the User Settings framework feature and save the data as a blob of data, or as XML.
You could also take a look at SqlCompact for a very lightweight in-process database. You can then save all user contacts in a single database which could live e.g. in the same directory as the application; you could easily use something like EF4 for your DAL.
That might be a bit more effort though, as it sounds like you are 99% of the way there with your current architecture.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With