0

I am following an MVC tutorial on ASP.NET core and currently created a movie database application using scaffolding.

The application can create and display movies entries but I can't locate the database in my MSSMS.is it hidden? I have looked into the system database table with no luck. I know the database exists because the application can persist the data. Tutorial Link https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-model?view=aspnetcore-5.0&tabs=visual-studio

man like dave
  • 15
  • 1
  • 5
  • Search localdb. You can access it in VS. You can connect to it using SSMS – 3m3sd1 Jun 16 '21 at 12:53
  • Have you trying refreshing? the GUI could be not showing because you didn't refresh the visualization. If you refresh and couldn't see, try restarting it – Magnetron Jun 16 '21 at 12:53
  • Check https://stackoverflow.com/questions/21563940/how-to-connect-to-localdb-in-visual-studio-server-explorer – 3m3sd1 Jun 16 '21 at 12:55

1 Answers1

0

It is saved to a SQL Server Express LocalDB instance, using the connectionstring in appsettings.json.

You can connect to it with SSMS using this server name: (localdb)\mssqllocaldb

lrpe
  • 730
  • 1
  • 5
  • 13
  • 1
    Thank you the server name was (localdb)\mssqllocaldb, i had to remove the extra back slash – man like dave Jun 16 '21 at 13:44
  • Could you edit your answer as I don't have edit privileges. – man like dave Jun 16 '21 at 13:49
  • Removed the extra backslash. I mistakenly copied it verbatim from the connectionstring, where an extra backslash is required as C# uses it as the beginning of an escape sequence. – lrpe Jun 17 '21 at 05:29