Category Archives: C#

C# – Logging in .NET Core

By | 01/09/2020

In this post, we will see how to add Logging in the project Api.Orders created in the post: Web API – How to use Polly library with Ocelot.Logging is a built-in feature of ASP.NET Core and .NET Core Work Services and it is provided as part of the Microsoft.Extensions.Logging library. For more information: Microsoft Web… Read More »

Category: C# Tags:

C# – SOLID Principles

By | 29/04/2020

In this post, we will see what SOLID means and how to implement it using C#. SOLID is a mnemonic acronym for five designers principles that help us to write software more understandable, easier to maintain, flexible and easier to extend.The five principles are:Single responsibility principleOpen/closed principleLiskov substitution principleInterface segregation principleDependency inversion principle  SINGLE RESPONSABILITY… Read More »

C# – How to add and read an appsetting.json file in a Console Application

By | 19/02/2020

In this post, we will see how to add and read an appsettings.json file in a .NET Core Console Application.We open Visual Studio and we create a Console Application (.NET Core) project called “TestJson“: Now, we add a file called “Parameters.json”, where we will storage a connection string for a DB and two parameters called… Read More »

C# – Dapper

By | 06/12/2019

From Dapper Official Web Site:“Dapper is a simple object mapper for .NET and owns the title of King of Micro ORM in terms of speed and is virtually as fast as using a raw ADO.NET data reader. An ORM is an Object Relational Mapper, which is responsible for mapping between database and programming language.Dapper extends… Read More »

C# – Extension method

By | 12/08/2019

Extension methods enable you to “add” methods at one existing type without creating a new derived type, compiling, or otherwise modifying the original type.An extension method is a static method that must been define in a static class with at least one parameter. The first parameter specifies the type on which the extension method will… Read More »

Category: C# Tags: