0

I'm Creating Windows forms app using EF Code First. I want to save database in the local folder of project like app_data folder as we use to save in asp.net web forms. I think this makes deployment easier. How this can be done in Windows forms?

1 Answer 1

1

set a string to Environment.SpecialFolder.CommonApplicationData

string mAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);

see also What directories do the different Application SpecialFolders point to in WindowsXP and Windows Vista

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.