5 Awesome Nuget Packages for DotNet 5 & DotNet Core in 2021

Dominique Kleeven
3 min readFeb 13, 2021

First things first: I’d like to share this awesome git repository with lots of NuGet packages and other dotnet components.

1. Fluent Assertions

FluentAssertions allow you to more naturally specify the expected assertion and outcome of a test case/unit test. I highly recommend this to anyone programming and testing in C#/.NET.

Code Example from the Fluent Assertions Documentation:

IEnumerable numbers = new[] { 1, 2, 3 };

numbers.Should().OnlyContain(n => n > 0);
numbers.Should().HaveCount(4, "because we thought we put four items in the collection");

2. AutoMapper

AutoMapper basically enables you to easily convert domain objects to other domain objects based on their property names. I especially like AutoMapper for its simplicity and making development life a lot easier when working with DAO and DTO objects.

Check out the AutoMapper github for some great examples:

3. Flurl

Flurl is an awesome URL builder for dotnet (I also really like it for integration testing). That’s all there is to it :)

Quick code example from the Flurl GitHub:

var result = await "https://api.mysite.com"
.SetQueryParams(new { api_key = "xyz" })
.PostJsonAsync(new { first_name = firstName, last_name = lastName })

4. Polly

Polly is an amazing NuGet package that easily allows you as a developer to add retry policies, circuit-breaker policies, and caching. It’s really easy to set up and I highly recommend it.

You can check out their github for some code examples/getting started with Polly.

5. MediatR

If you haven’t heard of this NuGet package you’re missing out. It allows you to easily implement the Mediator design pattern into your application and enables you to loosely couple your classes with a messaging/command system.

Highly recommended for almost any project.

Check out the MediatR GitHub Wiki for some code examples and documentation.

Feel free to share some of your favorite Nuget Packages :)

Thanks for reading.