Blog

Blog posts on .NET, Azure, and more.

Measuring code coverage of .NET Core applications

November 06, 2016 by Anuraj

C# ASP.NET Core Unit Testing Code Coverage .NET Core

This post is about getting code coverage of .NET Core using Opencover. This is an update post, long back I wrote a post on code coverage using ASP.NET Core in RC days. This post is using dotnet command and 1.0 version. Opencover is a code coverage tool for .NET 2 and above, support for 32 and 64 processes with both branch and sequence points; roots proudly based in PartCover - https://github.com/OpenCover/opencover/

Middleware filter in ASP.NET Core

October 28, 2016 by Anuraj

C# ASP.NET Core Middleware filter Middleware

This post is about a new feature in ASP.NET MVC, Middleware filter. Middleware typically sits in the global request handling pipeline. If you want to apply middleware to a specific controller or action method, you can use this feature. This feature only available with ASP.NET Core MVC 1.1. Long back I created a middleware (HTML Minification Middleware), which helps to minify generated HTML of an action. After few days I got a request to implement configuration options, which helps to exclude certain actions from minification. Now I can use Middleware filters instead of configuring the options.

Using Response Compression Middleware in ASP.NET Core

October 26, 2016 by Anuraj

C# ASP.NET Core Compression Middleware

This post is about using Response Compression Middleware in ASP.NET Core. Long back I wrote blog post on Enabling GZip Compression in ASP.NET5. It was a custom middleware I implemented in DNX days. Now as part of ASP.NET Core 1.1 Preview 1, Microsoft introduced Response Compression Middleware in ASP.NET Core.

Using WebListener in ASP.NET Core

October 25, 2016 by Anuraj

C# ASP.NET Core WebListener

This post is about using WebListener server in ASP.NET Core. WebListener is a web server for ASP.NET Core based on the Windows Http Server API. WebListener is a Windows-only HTTP server for ASP.NET Core. It runs directly on the Http.Sys kernel driver, and has very little overhead. WebListener cannot be used with the ASP.NET Core Module for IIS. It can only be used independently. Kestrel is designed to be run behind a proxy (for example IIS or Nginx) and should not be deployed directly facing the Internet.

Implementing dotnet ef database update command in MySql

October 13, 2016 by Anuraj

C# ASP.NET Core MySql EF Migrations

This post is about implementing dotnet ef database update command with MySql connector (MySql.Data.EntityFrameworkCore). Few days back I did a post on using MySql in ASP.NET Core. But one problem I found was when calling dotnet ef database update command, the lib was throwing not implemented exception. I had a discussion with @RuAnt, and I found the github repo - https://github.com/mysql/mysql-connector-net. As I got some time today, I thought of exploring the source and implementing the same, if it is not complex. :) So as a first step, I looked into the Sqlite and SqlServer implementations, and from the exception stack, I come to know about the method, which is not implemented.

Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub