1. 本地数据库连接
server name可以从链接字符串中取: (localdb)MSSQLLocalDB
注意少写一个.
{ "Logging": { "IncludeScopes": false, "LogLevel": { "Microsoft.EntityFrameworkCore": "Warning", "Microsoft.AspNetCore.NodeServices": "Warning", "Default": "Warning" }, "Data": { "Products": { "ConnectionString": "Server=(localdb)\MSSQLLocalDB;Database=SportsStoreAngular;Trusted_Connection=True;MultipleActiveResultSets=true" }, "Identity": { "ConnectionString": "Server=(localdb)\MSSQLLocalDB;Database=Identity;Trusted_Connection=True;MultipleActiveResultSets=true" } } } }
2.新增连接
(localdb)mssqllocaldb
3.修改连接
修改数据库名称,可以连接到具体的数据库里