I'm trying to finish the ASP.NET CORE tutorial on Pluralsight on a MAC. I'm running MSSQL server using Docker and its seems to work (i have the sql database up and running as shown here)
The second step was to have my asp.net core application to connect with this mssql database. Here are what i have for the connection string inside appsettings.json:
"ConnectionStrings": {
"OdeToFood2Db": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=OdeToFood2;Integrated Security=True"
}
this is what i have for ConfigureServices() inside startup.cs:
services.AddDbContextPool<OdeToFood2DbContext>(
options =>
{
options.UseSqlServer(Configuration.GetConnectionString("OdeToFood2Db"));
}
);
I then tried to run
dotnet ef dbcontext info -s ../OdeToFood2/odeToFood2.csproj
but im getting the
Build started...
Build failed. Use dotnet build to see the errors.
error. I think the issue is that i have the connection string wrong since im running my mssql on docker and not locally like the tutorial i'm following.
If anyone could point me in the right direction that would definitely help a tons, i've been stuck on this issue for 5 days now and it is excruciating. Thanks in advance!