Awesome libraries and tools for .NET (Core and Full framework)

A list of awesome libraries and tools for .NET (Core and Full framework)

Published on Tuesday, 19 March 2019

Summary

This is a list of awesome libraries and tools that help write great applications. As they say, we stand on the shoulders of giants!

>> Write cleaner code and avoid using exceptions for control flow

OneOf

An implementation of discriminated unions in C#

public OneOf<User, InvalidName, NameTaken> CreateUser(string username)
{
    if (!IsValid(username)) return new InvalidName();

    var user = _repo.FindByUsername(username);

    if(user != null) return new NameTaken();

    var user = new User(username);
    _repo.Save(user);
    return user;
}

>> Build a URI/URL using a fluent API

Flurl Documentation

using Flurl;

var url = "http://www.some-api.com"
    .AppendPathSegment("endpoint")
    .SetQueryParams(new {
        api_key = ConfigurationManager.AppSettings["SomeApiKey"],
        max_results = 20,
        q = "Don't worry, I'll get encoded!"
    })
    .SetFragment("after-hash");

Web API Documentation

>> Read and write CSV | Excel or any delimited file

  1. CSV Helper

  2. EP Plus - Can only do excel files.

>> Sending Emails

  1. Using SMTP Mailkit
  2. Sendgrid
  3. Mailgun

>> ReportGenerator

converts XML reports generated by OpenCover, PartCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo or Clover into human readable reports in various formats.

Source on Github