Some Of The Useful Nuget Packages For Dotnet Project
Now a days all the packages from microsoft also available on nuget. Just to remind that here I am providing some list of packages that are not standard package that comes with project as a default.
Also it is possible that I will keep update this post as I will find new packages that are useful.
Validation
Used for validation of object. This will be used to validate any type of object. It also supports various level of configuration.
FluentValidation
nuget.org/packages/FluentValidation nuget.org/packages/FluentValidation.AspNetC.. nuget.org/packages/FluentValidation.Depende..
Following two are type of validation but It is specially use for when you have to check parameter or argument of method.
Ensure.That
Guard.Net
NullGuard
Mapper
Mappper functionality is used to map object of one type to another type. This is specially used when object pass from one layer to another layer and you only want to expose object as DTO and not the actual business object.
AutoMapper
Mapster
nuget.org/packages/Mapster nuget.org/packages/Mapster.EFCore nuget.org/packages/Mapster.Async nuget.org/packages/Mapster.DependencyInject.. nuget.org/packages/Mapster.Core
TinyMapper
UnitTesting
For mocking purpose following packages is being used.
Moq
Moq.AutoMock
NSubstitute
FakeItEasy
EFCore.TestSupport
This package is supporting package and it support functionality to clear migration and apply migration. Also different DB as per different test. Using this it is possible to use actual DB for unittest. nuget.org/packages/EfCore.TestSupport
Domain Driven Design
ValueOf
nuget.org/packages/ValueOfThis is used to create Value object with singleline of code and very useful.
CQRS (Command query responsibility segregation)
MediatR
nuget.org/packages/mediatrThis is simple implementation of mediator pattern. It is very good for CQRS implementation and it is not heavy too.
Result Checking
While working with API, there is possibility to have multiple result possible. Like actual result or some kind of error or some other indication.
OneOf
This is used when there is multiple result type possible but at a time there is only one result from type provided.
FluentResults
nuget.org/packages/FluentResults
This is also used same purpose as OneOf. Checking success or failure and result type.
CommandLine Utility Building
To build the command line utility in more manageable way. It allows to add multiple option, easy to extend.
Cocona
This is simple yet useful. Also its syntax is quite intuitive.
System.CommandLine
nuget.org/packages/System.CommandLine/2.0.0..
This is still in preview but has rich set of functionality. For simple command it is not as intuitive as Cocona but it is still in beta so we can hope for good final release. It has many supported package as well.
Summary
There are many other package I will put over here. Also if you are using any package in any category ( category even not listed over here) then also put that in comment section.
Update 1 : 02-03-2022
- TinyMapper Added to the list for Mapper category.
Update 2: 15-03-2022
- Commandline tool building package added.