jff-csharp-tools-9 9.3.10

dotnet add package jff-csharp-tools-9 --version 9.3.10
                    
NuGet\Install-Package jff-csharp-tools-9 -Version 9.3.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="jff-csharp-tools-9" Version="9.3.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="jff-csharp-tools-9" Version="9.3.10" />
                    
Directory.Packages.props
<PackageReference Include="jff-csharp-tools-9" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add jff-csharp-tools-9 --version 9.3.10
                    
#r "nuget: jff-csharp-tools-9, 9.3.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package jff-csharp-tools-9@9.3.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=jff-csharp-tools-9&version=9.3.10
                    
Install as a Cake Addin
#tool nuget:?package=jff-csharp-tools-9&version=9.3.10
                    
Install as a Cake Tool

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

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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.3.10 0 4/28/2026
9.3.9 179 2/11/2026
9.3.8 120 1/27/2026
9.3.7 481 12/16/2025
9.3.6 280 12/16/2025
9.3.5 459 12/11/2025
9.3.4 475 12/11/2025
9.3.3 450 12/11/2025
9.3.2 579 12/8/2025
9.3.1 433 12/8/2025
9.3.0 233 12/4/2025
9.2.12 130 11/28/2025
9.2.11 322 11/21/2025
9.2.10 323 11/21/2025
9.2.9 328 11/21/2025
9.2.8 419 11/20/2025
9.2.7 417 11/19/2025
9.2.6 418 11/19/2025
9.2.5 184 8/3/2025
9.2.4 175 8/3/2025
Loading failed