Full ASP.NET Core 10.0 LTS application with DDD, CQRS and Event Sourcing
Full ASP.NET Core 10.0 LTS application with DDD, CQRS and Event Sourcing
Config User Secret:
DDD.Services.Api.csproj > UserSecretsId (Free to change to any GUID/UUID)C:\Users\[UserName]\AppData\Roaming\Microsoft\UserSecrets\\secrets.json~/.microsoft/usersecrets//secrets.jsonsecrets.json for Windows:
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=DDD;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}LocalDB is a packaging mechanism for SQL Server Express Edition, and is only available for Windows, use Microsoft SQL Server or Azure SQL Edge for Linux / macOS
secrets.json for Linux / macOS:
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=,1433;Initial Catalog=aspnetcore-ddd;User ID=SA;pwd=;Integrated Security=False;ConnectRetryCount=0;MultipleActiveResultSets=True"
}
}Select profile > Run (F5)Select configuration > Run (F5)dotnet build Src/DDD.Services.Api/DDD.Services.Api.csproj
dotnet run --project Src/DDD.Services.Api/DDD.Services.Api.csproj --launch-profile Dev
dotnet watch --project Src/DDD.Services.Api/DDD.Services.Api.csproj rundotnet testdocker build -t aspnetcore-docker-image .
docker run -it --rm -p 3000:80 --name aspnetcore-docker-container aspnetcore-docker-image
docker run -d -p 3000:80 --name aspnetcore-docker-container aspnetcore-docker-imagedocker compose up -d
docker compose ps
docker compose stoppodman build -t aspnetcore-docker-image .
podman run -it --rm -p 3000:80 --name aspnetcore-docker-container aspnetcore-docker-image
podman run -d -p 3000:80 --name aspnetcore-docker-container aspnetcore-docker-imagepodman-compose up -d
podman-compose ps
podman-compose stopabstract keyword to appropriate classIQueryable, IEnumerable, IList interfacesNo open issues yet, or sync has not completed.