EF support for LocalDB is good, but LocalDB has its own flaws (do not want SQLite as the database files can be used like ordinary files).
LocalDB on a computer will have a unique constraint on the database, requires that the localdb of the machine cannot have the same name. If you do not notice this, you will have the following problems:
Cannot attach the file ' {0} ' as database ' {1} '
EF Codefirst cannot create a new database (LOCALDB) When you specify a different database file path to create a new database with the same name.
Ways to remove LocalDB
You cannot delete a file simply by using a tool or command line to delete it:
1.SqlServer Management Studio or SQL Server Object Explorer:
Or
2.VS Developer Command Prompt
Pm> sqllocaldb.exe Stop v11.0 "v11.0" stopped. PM> pmDelete v11.0 "v11.0" deleted. PM> Sqllocaldb.exe start v11.0 "v11.0" started.
See more details:
Https://stackoverflow.com/questions/13275054/ef5-cannot-attach-the-file-0-as-database-1
EF with (LocalDb) V11.0