https://github.com/NetDevPack/NetDevPack
A smart set of common classes and implementations to improve your development productivity.
https://github.com/NetDevPack/NetDevPack
aspnetcore cqrs ddd devpack fluentvalidation identity mediatr messaging notification specification-pattern validation
Last synced: 13 days ago
JSON representation
A smart set of common classes and implementations to improve your development productivity.
- Host: GitHub
- URL: https://github.com/NetDevPack/NetDevPack
- Owner: NetDevPack
- License: mit
- Created: 2020-06-02T04:34:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-11-19T02:33:28.000Z (2 months ago)
- Last Synced: 2026-01-14T08:53:18.876Z (18 days ago)
- Topics: aspnetcore, cqrs, ddd, devpack, fluentvalidation, identity, mediatr, messaging, notification, specification-pattern, validation
- Language: C#
- Homepage:
- Size: 1.13 MB
- Stars: 822
- Watchers: 35
- Forks: 102
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

| Package | Version | Popularity |
| ------- | ----- | ----- |
| `NetDevPack` | [](https://nuget.org/packages/NetDevPack) | [](https://nuget.org/packages/NetDevPack) |
## What is the .NET DevPack?
NetDevPack is a comprehensive set of reusable classes and interfaces designed to improve development experience and productivity in .NET applications. It encapsulates best practices and common patterns such as Domain-Driven Design (DDD), CQRS, Validation, Notification, and Mediator.
## Give a Star! ⭐
If you find this project useful, please give it a star! It helps us grow and improve the community.
## Features
- ✅ Domain-driven design base classes and interfaces
- ✅ CQRS support via Mediator pattern
- ✅ FluentValidation integration
- ✅ Domain events and notifications handling
- ✅ Unit of Work and repository base contracts
## Installation
Install via NuGet:
```bash
dotnet add package NetDevPack
```
## Basic Usage
### Domain Entity
```csharp
using NetDevPack.Domain;
public class Customer : Entity
{
public string Name { get; private set; }
public Customer(Guid id, string name)
{
Id = id;
Name = name;
}
}
```
### Repository Interface
```csharp
using NetDevPack.Data;
public interface ICustomerRepository : IRepository
{
Task GetByName(string name);
}
```
### Using the Mediator
```csharp
public class CustomerCommandHandler : IRequestHandler
{
private readonly IMediatorHandler _mediator;
public CustomerCommandHandler(IMediatorHandler mediator)
{
_mediator = mediator;
}
public async Task Handle(RegisterCustomerCommand request, CancellationToken cancellationToken)
{
// Business logic
await _mediator.PublishEvent(new CustomerRegisteredEvent(...));
return new ValidationResult();
}
}
```
### Fluent Validation
```csharp
using FluentValidation;
public class CustomerValidator : AbstractValidator
{
public CustomerValidator()
{
RuleFor(c => c.Name).NotEmpty();
}
}
```
## Example
For a full implementation example, check [Equinox Project](https://github.com/EduardoPires/EquinoxProject/)
## Compatibility
Supports:
- ✅ .NET Standard 2.1
- ✅ .NET 5 through 9 (including latest versions)
- ⚠️ Legacy support for .NET Core 3.1 and older (with limitations)
## About
.NET DevPack was developed by [Eduardo Pires](http://eduardopires.net.br) under the [MIT license](LICENSE).