using entity framwork code first approach, how can change default database directory to App_Data.
I tried with setting this path with custom db name in app.config but it always hits local sql server path in update-database.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
</configuration>
you could set the database initializer for a context using the appSettings section of the configuration file. In EF 4.3 we introduced the custom entityFramework section to handle the new settings. Entity Framework will still recognize database initializers set using the old format, but we recommend moving to the new format where possible.
The entityFramework section was automatically added to the configuration file of your project when you installed the EntityFramework NuGet package
See this Settings