if don't wanna use the ip address
docker get IP address command:
docker inspect -f '{{range. NetworkSettings. Networks}}{{. IPAddress}}{{end}}' container_name_or_id
use host.docker.internal
if don't wanna use the ip address
docker get IP address command:
docker inspect -f '{{range. NetworkSettings. Networks}}{{. IPAddress}}{{end}}' container_name_or_id
use host.docker.internal
1. appsettings.json
namespace ReactAPIApp.Server.Models{public class Driver{public int Id { get; set; }public string Name { get; set; } = null!;public int DriverNumber { get; set; }}}
4. Add Context for example add Data folder
Data/ApiDbContext.cs
using Microsoft.EntityFrameworkCore;
using ReactAPIApp.Server.Models;