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?

Zahid
  • 36
  • 6

1 Answers1

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

ZedLepplin
  • 307
  • 2
  • 12