Category Archives: .Net Core 2.0

Enable swagger documentation for .Net Core Web API

Swagger is useful for dynamically generating elegant documentation from a compliant .Net Core Web Restful API services. It discovers methods available on API and allows you to quickly test your micro services using a help page with out much fuss. For a .Net Core 2.0 Web API, adding swagger involving referencing nugets packages and few… Read More »

ASP.Net Core Web API Bearer Token validation with a third party federated identity provider code sample

Federated Identity is a single sign-on (SSO) service that allows users to gain access to corporate resources at enterprise level with same set of credentials. Federated Identity system implements an authentication mechanism managed by external identity provider. This can minimize administrative overhead and improve the user experience. Federated Identity has the advantage that management of… Read More »

ASP.Net MVC Core Action filter sample for parameter validation

Filters have a special place in ASP.Net MVC Framework. Filters are custom classes/middlware that provide declarative and programmatic means to add pre-action and post-action behavior to controller action methods . Filters run in the context of MVC action processing pipeline. ASP.Net MVC supports 4 different types of filters. Authorization filter – deals with authorization logic.… Read More »

Entity Framework Core performance improvement tips

Entity Framework is a popular ORM choice for data access needs in .Net world. It is superior and mature framework. Of course, ORM is an abstraction at the end of day, some times we may feel we are not enough juice out of it when compared with ADO.Net library. There is always a trade off.… Read More »

EF Core Power tools

Prior Incarnations of Entity Frameworks like EF 6, large section of developers enjoyed their Entity Framework Designer tools. However, puritans won. Code first approach, POCO classes took over the EF landscape. Well, POCO approach is well and good. But, EDMX approach a.k.a designer approach was engaging and a good starting point for novice programmers. Well,… Read More »

EF Core 2.0 improvements – LIKE Operator, Query filters

Entity Framework (EF) Core 2.0 comes with some cool nifty features. Improved LINQ translation to optimized SQL queries,  long pending feature request for LIKE LINQ operator is finally fulfilled. Other interesting feature is setting up Global Query filters which essentially allow you to set up global WHERE function at DbContext level and C# string interpolation… Read More »

Building .Net Core Apps for Docker

As mentioned in other posts about Docker, Docker is talk of the town. Docker is a containerization platform which fully lives up to it’s motto – “Build, Ship, and Run Any App, Anywhere“. Docker containers provides an additional layer of abstraction on top of virtual machines we’re familiar with. Simply put, Docker is a tool… Read More »

.Net Core Web Api CRUD Controller unit testing code sample

Unit testing in .Net Core has been made simple. It has been designed with testability in mind. TDD approach has paid rich dividends for the developers who follow them religiously. Unit tests gives you the confidence and faith in your code, catches errors early in the cycle and overall, improves productivity levels across the team.… Read More »