Where should I store user config data? Specificaly the path to the data file?

Posted by jamone on Stack Overflow See other posts from Stack Overflow or by jamone
Published on 2010-03-24T20:13:31Z Indexed on 2010/03/24 20:23 UTC
Read the original article Hit count: 260

I have an app using a SQLite db, and I need the ability for the user to move the data file and point the app to where it moved to. I used the Entity Framework to create the model, and by default it puts the connection string in the App.Config file. From what I've read if I make changes to the connection string there then they won't take effect until the app is restarted. That seems a bit clunky for my use. I see how I can init my model and pass in a custom string but I'm unsure what the best practice is in where to store basic user prefrences such as this? Ini, Registry, somewhere else? I don't want the user to have to "Open" the file each time, just when it relocates and then the app will try to auto open from then on.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET