Skip to main content

How to enable gzip compression in ASP.NET Core

ASP.NET Core 1.1 has an inbuilt middleware for Response compression, which by default uses gzip compression. All modern browsers support response compression, and you should take advantage of it. Instead of sending response from the server as it is, it’s better to compress it and then send it, as this will reduce the response size and provides better speed. So in this post, let’s see how to enable gzip compression in ASP.NET Core. Read More

Batching of Statement in Entity Framework Core

What is Batching of Statement in Entity Framework Core?

There are many new features introduced in Entity Framework Core (EF Core). And one of the most awaited feature is, batching of statement. So what exactly batching of statement is? Batching of statement means that it doesn’t send individual command for every insert/update/delete statement. It will batch multiple statements in a single round trip to the database. So In this post, let’s see how it works and then compare the results with EF6.
Read More

Import and Export xlsx in ASP.NET Core

This post shows how to import and export .xls or .xlsx (Excel files) in ASP.NET Core. And when thinking about dealing with excel with .NET, we always look for third-party libraries or component. And one of the most popular .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx) is EPPlus. However, at the time of writing this post, this library is not updated to support .NET Core. But there exists an unofficial version of this library EPPlus.Core which can do the job of import and export xlsx in ASP.NET Core. This works on Windows, Linux and Mac. Read More

Bye-Bye Project.json and .xproj and welcome back .csproj

Bye-Bye Project.json and .xproj and welcome back .csproj

In my previous post, I posted about Some cool Project.json features with ASP.NET Core and also mentioned about announcement made by Microsoft in May 2016 that Project.json will be going away so as .xproj and .csproj will make a comeback for .NET Core. This change was supposed to come out after tooling preview 2 release and in one of recent nightly build release of .NET core, this change is introduced. So bye-bye Project.json and .xproj and welcome back .csproj.
Read More

Some cool Project.json features with ASP.NET Core

As of today, Project.json is the way to define your dependencies, managing runtime frameworks, compilation settings, adding scripts to execute at different events (Prebuild, Postbuild etc.) for ASP.NET Core projects. Though, it will be no longer available in future releases of ASP.NET Core. But since it is available till now, and I used couple of features which I found useful. So sharing those cool Project.json features with ASP.NET Core that you may also find helpful. Read More