Why is filePath null? Any ideas on how to get relative filePath?
internal sealed class Configuration : DbMigrationsConfiguration<MvcProject.Models.FileDb> { public Configuration() {
I have the above code in the Configuration.cs file in the Migrations folder created when creating the entity structure in an ASP.NET MVC project
When I run "Update-Database -Verbose" in the package manager console, I get an error that filePath is null.
If I manually installed filePath with an absolute URL in the file:
string filePath = "C:/Users/User1/My Documents/Visual Studio 2012/Projects/MvcProject/Content/File.txt";
Everything works perfectly.
Obviously, the goal is to have a relative path that allows you to work with different developers with different settings.
In truth, all I need is a file - not necessarily a path. Any help would be appreciated.
source share