Many developers when they start working on ASP.NET Core they have the decision to make like which libraries are they going to use to get the code done. A list of Top 12 ASP.NET Core Libraries will allow developers to understand these so that they can pick appropriate libraries for their projects.
Libraries to be selected will depend upon the requirements i.e. functionalities required in the application. But irrespective of the requirements there are some cross-cutting concerns that should be part of any application like security, logging, exception handling, etc.
For .NET many libraries are available from which developers can select. With the release of .NET Core, mostly all of the library providers have started providing support for .NET Core. It is very important for the success of the project to pick rights libraries.
Here is my list of the top 12 ASP.NET Core libraries that developers should know about so that they can decide which tools they are going to use for application development.
Here is the list of Top 12 ASP.NET Core Libraries
Table of Contents
Unit testing is an important part of software development & automated unit testing helps in getting the regression test done much quicker. NUnit is an open-source unit testing framework for .NET Core. It is one of the most popular frameworks available for unit testing your code.
NUnit does not create any test scripts by itself but it allows you to use its tools and classes to write test scripts for your code.
Let’s say you have two different classes EmployeViewModel & EmployeeDTO with the same data members and you need to copy data from one object to another. Now you cannot set an instance of one object to another object as though data members match but objects are of different classes. You will have to use the traditional approach i.e. copy data from one object to another field by field.
To simply this job of mapping data from one object to objects Auto Mapper should be used. Auto Mapper is an open-source library and It maps the properties of two different objects
You can check my other article on How to implement Automapper in ASP.NET Core 3.1
It is an open-source high-performance JSON framework for .NET. This is very popular & easy to use as well. It helps you to serialize and deserialize any .NET object with JSON serializer i.e. it allows you to convert an object to & from JSON.
Serilog is a popular third-party logging provider that is supported in ASP.NET Core Logging. It is very easy to set up and provides API for logging. Serilog provides a structured logging framework and supports a wide variety of sinks to log to console, files, azure, etc.
Serilog support structured logging that allows message string along with objects to be logged and these are logged in a structured format which allows it easier to be queried by the software program.
You can check my other article on ASP.NET Core Logging with Serilog
Entity Framework Core
Entity Framework Core is an object-relational mapper (O/RM) framework for .NET Core. It is a new version of entity framework after entity framework 6.x and is open-source, lightweight & extensible. EF Core support many database engines.
ORM’s allows you to access and store data in the database using .NET objects and eliminated the need for traditional data access code which the developers used to write.
Here there is need to mention one more popular ORM library Dapper
You can check my other article on Entity Framework Core in ASP.NET Core 3.1
This library is available in ASP.NET core as Middleware for monitoring the health of the application. Health checks are exposed as HTTP endpoints by an application.
Health can be used by load-balancer to check application status and it can also be used to check parameters like memory, disk, connectivity with database or external services, etc.
if you want to know more about Middleware then you can check my other article on ASP.NET Core Middleware
If you want to push any data directly from the server to the client then this is the library for you. SignalR can be used for real-time functionality applications like chat, games, stock exchange tickers, etc.
MiniProfiler is an open-source & lightweight library. It is used to monitor the performance of an .NET application. It helps in identifying application performance issues.
It can be quite a challenge to perform background processing or run the task at the scheduled time in the ASP.NET Core web application. But open-source library Hangfire allows you to easily perform these tasks. Hangfire provides an easy way to perform this scheduled background processing in ASP.NET Core.
Here there is need to mention one more similar library Quartz.
RabbitMQ is a popular open-source message broker. RabbitMQ allows the integration of distributed applications using Messages & Queues. It allows us to implement asynchronous messaging between applications.
Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.
Polly is an open-source library to implement algorithms like retry logic, timeouts, circuit breakers, etc.
Swashbuckle is an open-source library to generate swagger documentation for ASP.NET Core Web API. This documentation can be used to explore and test API.
Here I have introduced to my list of Top 12 ASP.NET Core libraries for developers. I hope this will help you in selecting the right set of libraries for your project.