cover

Stryker.NET

💡 #unittest #tip - Test your tests with #stryker How do you verify the quality of your unit tests? Do you use code coverage metrics or something else? A good...

C# Puzzles

Happy New Year fellow dotnet developers! 🎆 Kickstart 2024 with the C# challenge. I have prepared 5 interesting (not entirely useful 🙂) C# puzzles. Can you solve some of them?...

ASP.NET Core - Request timeout

🚀 ASP.NET Core #news - Request timeout Request timeout is a new feature in ASP.NET Core 8.0 that allows you to set a timeout for a request. This feature is...

ASP.NET Core Short-circuit

🚀 ASP.NET Core #news - Short-circuit Short-circuit is a new feature in ASP.NET Core 8.0 that allows you to skip the entire request pipeline and return a response directly from...

ASP.NET Core - IExceptionHandler

🚀 ASP.NET Core #news - IExceptionHandler IExceptionHandler is a new interface in ASP.NET Core 8.0 that provides the ability to extract global exception handling into separate classes.

C# 12 - Collection expressions

🚀 #csharp 12 - #collectionexpressions I have been developing in .NET for over 16 years, but even now I struggle when I have to create and initialize a simple array....

Discriminated unions with OneOf

💡 #dotnet #tip for package V predchádzajúcom poste som písal o generickom union type Results<…> ako typovom definovaní odpovede z requestu. Čo však, keď chcem tento princíp použiť nie len...

Results vs TypedResult

💡 #aspnetcore #tip S ASP.NET CORE 7 prišla možnosť definovať response vášho endpointu silne typovo pomocou generického union typu Results<T1, ...>. Viac info 👇

ASP.NET Core - Bind with asparameter

💡 #aspnetcore #tips - AsParameter binding Občas sa stane, že máme parametrov v endpointe viac, ako by sme chceli. To znižuje čitateľnosť zápisu handlera pre takýto endpoint. V takomto prípade...

C# 12 - Primary constructor

📢 C# 12 Prináša zaujímavú novinku - Primary constructor 🎉 Primary constructor zjednoduší definíciu a inicializáciu tried. Umožní nám deklarovať parametre konštruktora priamo v deklarácii triedy, čo redukuje množstvo pomocného...

Verify tool

💡 #UnitTests #tips - #Verify tool. Verify je framework zjednodušujúci assertovanie komplexnejších dátových modelov a dokumentov. 1 Nainštaluj potrebný nuget balíček Verify.Xunit (podľa tvojho testovacieho frameworku) 2 Použi atribút [UsesVerify]...

Keyed service dependency

📢 Nová verzia #ASPNETCore 8 rozšíri dependency injection o “keyed service”. ➡️ Máš jedno rozhranie a k nemu viacero implementácií? ➡️ Potrebuješ do svojich tried injektnúť konkrétnu implementáciu na základe...

Minimal API - Custom output formatter

Primárny cieľ ASP.NET Core Minimal API je priniesť priamočiarý, jednoduchý a hlavne veľmi výkonný framework na tvorbu API. Miesto toho aby prinášal features, ktoré umožnia pokryť každý možný scenár použitia...

Prechod z Choco na Winget

Pre tých, ktorí nie sú zoznámení s balíčkovacími systémami, to sú nástroje, ktoré uľahčujú inštaláciu a aktualizáciu softvéru na vašom počítači. Inak povedané, ak potrebujete nainštalovať program, nemusíte hľadať súbor...

.NET 7 SDK - build-in container support

Či chceme alebo nie tak docker sa stáva už aj pri vývoji dotnet aplikácií štandardom. Väčšina návodov a článkov ukazuje aké je jednoduché kontajnerizovať dotnet aplikáciu. Napríklad niečo takéto: FROM...