Sign in

Florian van Dillen

@florianvandillen.nl
189 followers 341 following 67 posts

Developer and Cloud solution architect @ 4Dotnet

PostsRepliesMedia
Florian van Dillen @florianvandillen.nl · 13/10/2026
Voor iemand met zo'n grote bek over inhoud en onderbouwing kan hij wel verrassend slecht tegen kritiek 🤡
020
Florian van Dillen @florianvandillen.nl · 03/11/2025
When you find some @daprdev.bsky.social containers from two centuries ago 😊 (This is actually a known Docker CLI issue)
030
Florian van Dillen @florianvandillen.nl · 22/09/2025
Some cool new stuff in @jetbrains.com Rider added in the latest update!
000
Florian van Dillen @florianvandillen.nl · 31/03/2025
Dag Easypark! Gebruik de @anwbverkeer.bsky.social onderweg app wel.
010
Florian van Dillen @florianvandillen.nl · 10/12/2024
Wanneer ga jij eerlijk toegeven dat je hier enkel bent om dit soort nepreacties te plaatsen?
130
Florian van Dillen @florianvandillen.nl · 30/11/2024
As soon as we make this change, our AppHost stops complaining! Our AppHost can find the constant class and is now able to use its values. Thanks to this, changes to the values now only have to be made in one place and we can completely eliminate magic strings from our orchestration.
Code showing the reference is now properly resolved.
100
Florian van Dillen @florianvandillen.nl · 30/11/2024
Luckily, the fix is easy. We open up the AppHost .csproj file and make an edit to the projectreference to the constants project.
Edit to the Aspire AppHost .csproj marking the projectreference as a non-Aspire project resource.
220
Florian van Dillen @florianvandillen.nl · 30/11/2024
When we add this class library as a project dependency to our AppHost project, that works well. Until we actually try to use the constants! Whoops!
Error showing the constants cannot be resolved.
100
Florian van Dillen @florianvandillen.nl · 30/11/2024
We create a simple class library with a constants class that contains some static strings with our values.
Class containing constants.
100
Florian van Dillen @florianvandillen.nl · 30/11/2024
In the project that consumes the database, we now use an extension method provided by the Aspire.Microsoft.EntityFrameworkCore.SqlServer NuGet package. Note that we need the name of the SQL database resource created earlier. The code sets up our EF Core DbContext with the connection string.
Code showing how the project resource consumes the connection string.
100
Florian van Dillen @florianvandillen.nl · 30/11/2024
When we run the AppHost, you can see the connection string being provided to the running project (which is just an ASP.NET Core web API).
Aspire dashboard showing the connection string being provided to the running project.
100
Florian van Dillen @florianvandillen.nl · 30/11/2024
We can reference the SQL Server database using the .WithReference(sql) method. This injects the connection string to the database into the environment variables of the service.
Code showing how to reference the SQL Server database resource.
100
Florian van Dillen @florianvandillen.nl · 30/11/2024
Other dependencies, such as a SQL Server database, can be defined in code.
Code showing the creation of the SQL Server database dependency in the AppHost project.
100
Florian van Dillen @florianvandillen.nl · 30/11/2024
When creating your AppHost in Aspire, you can create resources from your projects by adding the projects as a dependency to your AppHost.
Project structure showing the project dependencies of the Aspire AppHost project.
100