X

Using custom appsettings.json with ASP.NET Core integration tests

ASP.NET Core introduced the concept of TestServer for integration testing of web applications. Integration tests need web application run with all bells and whistles to make sure that all components work together with no flaws. Often we need special settings for integration tests as web application cannot use live services and easiest way to do it is to use special appsettings.json file. This blog post shows how to do it.

Conditionally include partial view in ASP.NET Core

I have ASP.NET Core web application where I need to include partial view only if it exists. The application uses areas and some areas may have their specific side menu. This blog post shows two ways how to conditionally include partial view to ASP.NET Core layout page.

Implementing INotifyPropertyChanged

Short post about how to implement INotifyPropertyChanged without using any advanced tooling. I have some small UWP applications where I’m using MVVM to separate presentation and logic. Here is how I use INotifyPropertyChanged with base class for multiple view models.

Connecting Samsung Smart TV to speakers

Few months ago I bought new Samsung smart TV with 43” UHD screen. It’s for small room. Big was my surprise if I found out that it’s not so easy to connect this very smart device to regular speakers as there’s no analog audio output. After visit to local electronics and audio shop my problem got solved. Here’s how to make Samsung Smart TV works with external speakers.

Worker Service template in .NET Core 3.0

With ASP.NET Core 3.0 Preview 3 we have template for background processes like Windows services and Linux daemons. New project template is called Worker Service and this writing shows how it works and how to use it.

.NET Core 3.0 Preview 3 now available!

.NET Core 3.0 Preview 3 is out and there are many interesting updates to framework and to ASP.NET Core. Here’s the short list of what’s new.

Pre-compressed static files with ASP.NET Core

Optimizing web applications is important because more economic web applications consume less CPU cycles and need less bandwidth – resources we have to pay for. It’s easy to turn on response compression on ASP.NET Core, but serving pre-compressed files needs more work. This blog post shows how to do it.

Fail build on Azure DevOps for low code coverage

As my ASP.NET Core code coverage reports work nice in Azure DevOps build pipeline I took step forward and made builds fail on Azure DevOps if percent of lines covered is below 60. This blog post shows how to do it using ReportGenerator and Build Quality Checks build tasks.

Entity Framework Core supports constructors with arguments

Keeping objects complete and valid all the time is strategy used in different methodics. It’s perhaps most popular in Domain Driven Design (DDD). Entity Framework Core 2.1 made big step forward on supporting entities that doesn’t have default empty constructor. This blog post shows how to use Entity Framework Core and entities with constructor arguments.

Browse Windows Subsystem for Linux files with Windows Explorer

Windows Subsystem for Linux is great feature for running Linux programs and trying out multiplatform ASP.NET Core applications under Linux. It is possible to browse and edit files on disks mounted to WSL but it didn’t worked with files on WSL “disks”. With next version of Windows it will change.