0

I'm using the App_Data directory for SQLite in MVC4/Visual Studio 2010. System.Data.SQLite wants the DB path in the connection string.

Is there a way to reliably resolve the location of App_Data for my connection string that won't require code changes or if() statements?

Charles Burns
  • 10,310
  • 7
  • 64
  • 81
  • Not sure what you meant by App_Data. Have you tried Environment.SpecialFolder.ApplicationData? –  Sep 17 '13 at 05:25
  • Add_Data is a folder in every Visual Studio 2010 C# project. It's meant to be a place for the application to write data to disk safely, so is often used with embedded databases like SQLite and MS SQL Compact Edition. I haven't tried `Environment.SpecialFolder.ApplicationData` but I'll look into it. Thanks! – Charles Burns Sep 17 '13 at 16:23

0 Answers0