Category: Aspire
-
BlazorExtensionsAspire – integrate BlazorWebAssembly with WebAPI via Aspire–code
BlazorExtensionsAspire solves the problem of automatically injecting the URL of WebAPI into Blazor WebAssembly . The code for obtaining writes into appsettings.json of BlazorWebAssembly To use it add this to a Aspire AppHost project and then add this to a BlazorWebAssembly project and then inject Do not forget to add CORS to webAPI !
-
BlazorExtensionsAspire – integrate BlazorWebAssembly with WebAPI via Aspire–idea
Any WebAPI application needs an UI – and Blazor is a choice nowadays ( along other SPA , like Angular, React, Svelte … ) For integrating in ASPIRE ,there is a no simple task : Blazor should know the WebAPI url and use it to gather data. But the WebAPI URL could change – so…
-
TestExtensionsAspire- part 2- execution
Now the code mans to create commands about running dotnet <test or run> in the current folder of the csproj test project. Things that needed to be solved: 1. Test Project as NuGet Package The main project (.csproj) , that will be referenced as a NuGet dependency, it’s not an Aspire project, so it doesn’t…
-
TestExtensionsAspire- part 1 – idea
I know that Aspire could be used to perform integration test. And this can be achieved by having a test project that references Aspire – see https://learn.microsoft.com/en-us/dotnet/aspire/testing/write-your-first-test?pivots=xunit . However, how about allowing your test project ( even unit test project ) to run under Aspire Host ? Of course, Aspire will reference the test –…
-
SqlExtensionsAspire–part 2–code
I wanted the code to be easy used by any programmer that uses SqlServer in ASPIRE , such as For this to work, I create extensions – you can see them at https://github.com/ignatandrei/aspireExtensions/blob/main/src/SqlServerExtensions/SqlExtensionsAspire/SqlServerExtensions.cs Some problems that I solved 1. Versioning The Aspire version was 9.3 , so my version of the nuget SqlExtensionsAspire is 93.2025.208.1818…
-
SqlExtensionsAspire–part 1–idea
Aspire is a popular orchestrator for managing projects and Docker containers in the .NET ecosystem. While it’s primarily known for .NET, Aspire also supports other technologies like Node.js, Python, and more. Since I use SQL Server as my database, I found myself needing a few essential features: Execute pre-defined SQL commands at database creation timeI…
-
Execute SqlServer scripts at startup – Aspire 9.1 vs Aspire 9.2
One of the usual things in Software development is creating the database with all the tables,views,stored procedures and anything related . For Aspire 9.1 with Sql Ser,this involved a coordination between some shell scripts – see the code : The scripts where in the mount binding. Also,some .gitattributes files was required with to can execute…
-
Aspire 9.x add sql server database viewer
.NET Aspire is a formidable tool to visualize your components and relation between them . Today I will show you how to add a custom visualizer for SqlServer database . The code for adding a database is pretty simple The community extension,https://github.com/CommunityToolkit/Aspire,has already an extension,WithDBGate,that adds a viewer for the whole SqlServer .…
-
What I have learned by building .NET Stars -part 3- Aspire
I have that same idea to build a project : is what is called today a Modular Monolith – and it is very old in .NET world as can be implemented as a .sln solution. For those unfamiliar,a Modular Monolith allows you to break down your application into independent modules (think database access,data flow logic,a…
-
Aspire Blazor WebAssembly and WebAPI
Aspire is the new visualizer – see https://github.com/dotnet/aspire I am very fond of WebAPI – it allows for all people to see the functionality of a site,in a programmatic way ( side note:,my nuget package,https://www.nuget.org/packages/NetCore2Blockly,allows to make workflows from your WebAPI) And Blazor WebAssembly is a nice addition that the WebAPI . I am…