jff-csharp-tools
5.4.0
dotnet add package jff-csharp-tools --version 5.4.0
NuGet\Install-Package jff-csharp-tools -Version 5.4.0
<PackageReference Include="jff-csharp-tools" Version="5.4.0" />
<PackageVersion Include="jff-csharp-tools" Version="5.4.0" />
<PackageReference Include="jff-csharp-tools" />
paket add jff-csharp-tools --version 5.4.0
#r "nuget: jff-csharp-tools, 5.4.0"
#:package jff-csharp-tools@5.4.0
#addin nuget:?package=jff-csharp-tools&version=5.4.0
#tool nuget:?package=jff-csharp-tools&version=5.4.0
jff-csharp-tools
jff-csharp-tools is an open-source NuGet library suite for .NET Core (versions 6, 8 and 9) that provides reusable utilities to accelerate C# API development. It ships opinionated base classes and helpers for the most common boilerplate patterns: base entities with audit fields, generic repository/service layers, ready-made CRUD controllers and Minimal API endpoints, global exception handling, JWT authentication helpers, and a rich set of domain extensions.
📖 Documentation: /docs
Install Package Manager
PM> Install-Package jff_csharp-tools-6
or
PM> Install-Package jff_csharp-tools-8
or
PM> Install-Package jff_csharp-tools-9
Install .NET CLI
> dotnet add package jff_csharp-tools-6
or
> dotnet add package jff_csharp-tools-8
or
> dotnet add package jff_csharp-tools-9
Install Paket CLI
> paket add jff_csharp-tools-6
or
> paket add jff_csharp-tools-8
or
> paket add jff_csharp-tools-9
Example of use in a .NET API project
Example 1: Using default entities
using Jff.CSharpTools.Domain.Entity;
public class MyEntity : DefaultEntity
{
public string Name { get; set; }
}
Namespaces may vary depending on the package version (6, 8, or 9). Adjust the namespace according to the package installed in your project.
Example 2: Using DefaultService
using JffCsharpTools8.Domain.Service;
using JffCsharpTools8.Domain.Repository;
using JffCsharpTools.Domain.Entity;
using JffCsharpTools.Domain.Filters;
using JffCsharpTools.Domain.Model;
using Microsoft.EntityFrameworkCore;
// Suppose you have an entity:
public class Product : DefaultEntity<Product>
{
public string Name { get; set; }
}
// And a DbContext:
public class MyDbContext : DbContext
{
public DbSet<Product> Products { get; set; }
}
// Instantiating the service (dependency injection recommended):
var repository = new DefaultRepository<MyDbContext>(/* parameters */);
var service = new DefaultService<MyDbContext>(repository);
// Creating a new product
var newProduct = new Product { Name = "T-shirt" };
var createResult = await service.Create<Product>(userId, newProduct);
// Getting all products
var products = await service.Get<Product>();
// Getting products by user
var userProducts = await service.GetByUser<Product>(userId);
// Getting products by filter
var filter = new DefaultFilter<Product> { /* set filters */ };
var filteredProducts = await service.GetByFilter<Product, DefaultFilter<Product>>(filter);
// Getting product by primary key
var product = await service.GetByKey<Product, int>(userId, productId);
// Paginating products
var pagination = new PaginationModel<Product>
{
Page = 1,
PageSize = 10,
Filter = new DefaultFilter<Product>()
};
var paginatedProducts = await service.GetPaginated<Product>(pagination, x => x.Name != null);
// Updating a product
newProduct.Name = "Updated T-shirt";
var updateResult = await service.UpdateByKey<Product, int>(userId, newProduct, productId);
// Deleting a product
var deleteResult = await service.DeleteByKey<Product, int>(userId, productId);
Adapt the examples according to the package version (6, 8 or 9) and the namespaces used in your project.
Technology Stack
| Component | Technology |
|---|---|
| Language | C# (.NET Standard 2.1 / .NET 6, 8, 9) |
| ORM | Entity Framework Core (6 / 8 / 9) |
| HTTP framework | ASP.NET Core MVC + Minimal APIs |
| Authentication | ASP.NET Core JWT Bearer |
| Logging entity | Serilog (LogSerilogEntity) |
| CSV support | CsvHelper |
| Package registry | NuGet.org |
Principal Modules
| Module / Package | Description |
|---|---|
jff-csharp-tools (core) |
Shared entities, models, filters, and extension helpers (netstandard2.1) |
Domain/Entity |
DefaultEntity<T>, DefaultGuidEntity<T>, LogSerilogEntity |
Domain/Model |
DefaultResponseModel<T>, PaginationModel<T>, FileModel, ChartModel, TypeModel |
Domain/Filters |
DefaultFilter<T>, DefaultEntityFilter, PredicateBuilderFilter |
Domain/Extensions |
StringExtension, DateTimeExtension, EnumExtension, LinqExtensions, ClassExtension, EnumerableExtension |
jff-csharp-tools-6/8/9 |
Versioned packages with repository, service, controllers, and filters |
Domain/Repository |
DefaultRepository<T>, DefaultGuidRepository<T> (EF Core) |
Domain/Service |
DefaultService<T>, DefaultGuidService<T> |
Apresentation/Controllers |
DefaultController, DefaultCRUDController<TService,TContext,TEntity> |
Apresentation/Endpoints (v9) |
CrudEndpoints, CrudGuidEndpoints (Minimal API helpers) |
Apresentation/Filters |
ExceptionFilter, TokenEnumFilter, UnitOfWorkFilter |
Apresentation/Extensions |
HttpContextExtension, DefaultResponseModelExtension |
How to Build Locally
Prerequisites
- .NET SDK 9 (also supports .NET 6 and 8)
- Git
Clone and restore
git clone https://github.com/josembergff/jff-csharp-tools.git
cd jff-csharp-tools
dotnet restore
Build all projects
dotnet build jff-csharp-tools.sln
Build a specific package
dotnet build jff-csharp-tools-9/jff-csharp-tools-9.csproj
Pack NuGet packages
dotnet pack jff-csharp-tools-9/jff-csharp-tools-9.csproj --configuration Release
Or use the provided release script:
bash run-releaseBuild.sh
Documentation
Full technical documentation is located in /docs:
| File | Description |
|---|---|
/docs/architecture/context.puml |
C4 Context diagram (PlantUML) |
/docs/architecture/containers.puml |
C4 Containers diagram (PlantUML) |
/docs/architecture/components.puml |
C4 Components diagram (PlantUML) |
/docs/adr/ADR-001.md |
Architecture Decision Record — multi-target layered library |
/docs/database/schema.md |
Base entity schema and conventions |
/docs/flows/main-flows.md |
Main runtime flows (auth, CRUD, pagination, exception handling) |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- CsvHelper (>= 33.1.0)
- Microsoft.Extensions.Logging (>= 6.0.1)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 6.0.11)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on jff-csharp-tools:
| Package | Downloads |
|---|---|
|
jff-csharp-tools-8
An open-source project offering a suite of utilities to enhance C# development for .NET Core with MVC version 8.0.11 |
|
|
jff-csharp-tools-9
An open-source project offering a suite of utilities to enhance C# development for .NET Core with MVC version 9.0.0 |
|
|
jff-csharp-tools-6
An open-source project offering a suite of utilities to enhance C# development for .NET Core with MVC version 6.0.36 |
|
|
jff-csharp-tools-lib-9
An open-source project offering a suite of utilities to enhance C# development for .NET Core without MVC version 9.0.0 |
|
|
jff-csharp-tools-10
An open-source project offering a suite of utilities to enhance C# development for .NET Core with MVC version 10.0.0 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.4.0 | 34 | 5/8/2026 |
| 5.3.3 | 99 | 5/6/2026 |
| 5.3.0 | 55 | 5/6/2026 |
| 5.2.0 | 85 | 5/6/2026 |
| 5.1.0 | 104 | 5/6/2026 |
| 5.0.1 | 158 | 5/1/2026 |
| 5.0.0 | 170 | 5/1/2026 |
| 4.0.0 | 163 | 5/1/2026 |
| 3.0.0 | 254 | 5/1/2026 |
| 2.3.8 | 167 | 4/28/2026 |
| 2.3.7 | 246 | 2/11/2026 |
| 2.3.6 | 197 | 1/27/2026 |
| 2.3.5 | 566 | 12/16/2025 |
| 2.3.4 | 529 | 12/11/2025 |
| 2.3.3 | 550 | 12/11/2025 |
| 2.3.2 | 669 | 12/8/2025 |
| 2.3.0 | 431 | 12/4/2025 |
| 2.2.5 | 491 | 11/28/2025 |
| 2.2.4 | 626 | 11/21/2025 |
| 2.2.3 | 694 | 11/19/2025 |