Answer the question
In order to leave comments, you need to log in
Where is the database stored when using EF Core under SQL Server?
Let's say in the context for the database there is such a method:
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=database_01;Trusted_Connection=True;");
}
Answer the question
In order to leave comments, you need to log in
The *.mdf file with the base must be in the user's local folder.
C:\Users\%USERNAME%\database_01.mdf
or:
C:\Users\%USERNAME%\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB
https://stackoverflow.com/a/36297648/ 14163502
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question