5 best packages NuGet .NET 5 .NET Core in 2021
    • news
    • -
    • 5 best packages NuGet .NET 5 .NET Core in 2021

    5 best packages NuGet .NET 5 .NET Core in 2021

    Let’s start with the fact that I wanted to share a great repository, which contains a lot of really interesting NuGet packages and other useful components .NET. Now let us move on to the article.

    1. Fluent Assertions

    FluentAssetions allows for a more natural characteristics of the proposed statements and the result of the unit test, or test cases. I would recommend this to anyone who is programming and checks in C# or .NET.

    Here is an example code is originally from the 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 allows easy transformation of domain objects for others, relying in particular on the property names.

    Most AutoMapperze I like its simplicity – it makes development much easier when you are working with the DAO and DTO.

    Check the code examples on Github.

    3. Flurl

    Furl is a great URL builder, which performed well in tests of integration. And this is actually all you need to know about it.

    Here’s the code GitHuba:

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

    4. Polly

    Polly is a great package, which allows you to add policies retry, circuit-breaker policies and caching. In General, it is very easy to configure.

    Examples and instructions on how to begin, you will find on their Github.

    5. MediatR

    If you don’t know this package, you lose a lot. Makes it easy to implement a design pattern called the Mediator in Your application. You can also loose connections classes of commands or messages. Highly recommend for virtually any project. Check MediatR Wiki on Github and look at the sample code, and documentation.

    Share your favorite NuGet packages in the comments.

    Thank you for your attention!

    The original text in English language you can read here.



    1A Sportyvna sq, Kyiv, Ukraine 01023

    804 NE 125th St, Miami, FL 33161