Category Archives: C#

C# – 10

By | 31/08/2022

In this post, we will see three interesting features introduced with C# 10.For the complete list of all new features go to Microsoft web site.It is important to remember that for using C# 10 we need to install in our system .net 6. We start opening VS 2022, we create a new Console Application project called… Read More »

Category: C# Tags:

C# – Bogus

By | 03/08/2022

In this post, we will see how to use the library Bogus.net.But first of all, what is Bogus?Bogus is a library for generating fake data and it is based on the Faker.js. Here, we can find all information and the source code. We start creating a Console application called TestBogus where, we will install Bogus… Read More »

Category: C# Tags:

C# – AutoMapper

By | 29/06/2022

In this post, we will see how to configure and use AutoMapper in a Web API project.But first of all, what is AutoMapper?From official web site:“AutoMapper is an object-object mapper. Object-object mapping works by transforming an input object of one type into an output object of a different type. What makes AutoMapper interesting is that… Read More »

Category: C# Tags:

C# – “ValueOf” library

By | 15/06/2022

In this post, we will see the library ValueOf that we could use for validating our classes.But first of all, what is the purpose of ValueOf?From the GitHub page:“The Smell: Primitive Obsession is using primitive data types to represent domain ideas. For example, we use a String to represent a message, an Integer to represent… Read More »

Category: C# Tags:

C# – Redis Cache

By | 06/04/2022

In this post, we will see how to manage Redis Cache in a Web API .NET Core project.But first of all, what is Redis Cache?From Redis web site:“Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes,… Read More »

Category: C# Tags:

C# – Worker Services

By | 09/02/2022

In this post, we will see how to create a Worker Service in .net core to read messages in a RabbitMQ queue.But first of all, what is a Worker Service?From Microsoft web site:“Background service processing usually doesn’t involve a user interface (UI), but UIs can be built around them. In the early days with .NET… Read More »

Category: C# Tags:

C# – RabbitMQ

By | 19/01/2022

In this post, we will see how to send notification using RabbitMQ with C#.But first of all, what is RabbitMQ?“RabbitMQ is a message-broker that offers multiple messaging protocols and features that help components asynchronously pass data (in the form of messages) among one another.”In RabbitMQ the messages are not published directly to a queue but,… Read More »

Category: C# Tags:

C# – Yield

By | 15/09/2021

In this post, we will see how to use the Yield keyword in a C# application.But first of all, what is Yield?From Microsoft web site:“When you use the yield contextual keyword in a statement, you indicate that the method, operator, or get accessor in which it appears is an iterator. Using yield to define an… Read More »

Category: C# Tags:

C# – Use IHttpClientFactory in a console app

By | 25/08/2021

In this post, we will see how to use IHttpClientFactory in a console application, in order to call a WebAPI service that gives us a list of Users like this: The url of this WebAPI is http://localhost:3000/users and I have created this service using Json Server First of all, we create a Console application project… Read More »

Category: C# Tags: