FastSharp.Modules 1.0.0-beta.2

This is a prerelease version of FastSharp.Modules.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package FastSharp.Modules --version 1.0.0-beta.2
                    
NuGet\Install-Package FastSharp.Modules -Version 1.0.0-beta.2
                    
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="FastSharp.Modules" Version="1.0.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FastSharp.Modules" Version="1.0.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="FastSharp.Modules" />
                    
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 FastSharp.Modules --version 1.0.0-beta.2
                    
#r "nuget: FastSharp.Modules, 1.0.0-beta.2"
                    
#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 FastSharp.Modules@1.0.0-beta.2
                    
#: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=FastSharp.Modules&version=1.0.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FastSharp.Modules&version=1.0.0-beta.2&prerelease
                    
Install as a Cake Tool

FastSharp

NuGet .NET Publish NuGet packages Stars

ES: FastSharp es una librería ligera para crear MVPs y APIs en C# y ASP.NET Core (Minimal APIs) con CRUDs y endpoints personalizados basados en convenciones.

EN: FastSharp is a lightweight library for building MVPs and APIs in C# and ASP.NET Core (Minimal APIs) with convention-based CRUDs and custom endpoints.


Características / Features

  • 🚀 Zero Boilerplate: CRUDs completos en una sola línea de código. / Full CRUDs in a single line of code.
  • 🏗 Modular Architecture: Organiza tu código por dominios, no por capas técnicas. / Organize your code by domains, not by technical layers.
  • 🔍 Auto-Discovery: Escaneo automático de endpoints por Namespace. / Automatic endpoint scanning by namespace.
  • 📄 OpenAPI Ready: Integración nativa con Swagger y metadatos de endpoints. / Native integration with Swagger and endpoint metadata.
  • High Performance: Construido sobre Minimal APIs y Entity Framework Core. / Built on Minimal APIs and Entity Framework Core.

Instalación / Installation

dotnet add package FastSharp.Modules
dotnet add package FastSharp.Models

Nota / Note: Este repositorio contiene dos librerías: FastSharp.Modules (core) y FastSharp.Models (interfaces de modelos).


Requisitos / Requirements

ES

  • .NET 10 (o superior, según el TargetFramework del paquete)
  • Entity Framework Core
  • Tu aplicación debe registrar un DbContext en el contenedor de dependencias.
  • Tus modelos deben implementar IModel<TId>.
  • Tus módulos deben heredar de Module<TDbContext>.

EN

  • .NET 10 (or higher, based on the package TargetFramework)
  • Entity Framework Core
  • Your app must register a DbContext in the dependency container.
  • Your models must implement IModel<TId>.
  • Your modules must inherit from Module<TDbContext>.

Quick start / Inicio rápido

// YourProject/Slices/Products/ProductsModule.cs
using FastSharp.Modules;
using FastSharp.Modules.Configuration;
using YourProject.Data;
using YourProject.Models;

public class ProductsModule : Module<ApiDbContext>
{
    public ProductsModule()
    {
        // Configure the endpoint group for this module (also applies to CRUDs) this method is optional but allows you to set metadata or policies at the group level.
        ConfigureGroup(opt =>
            {
                opt.WithTags("Productos")
                .WithDescription("Endpoints for managing products in the inventory");
            });
        
        AddCRUD<Product, int>("/products", opt =>
        {
            opt.DisableEndpoint(GenericEndpoint.GetList)
               .ConfigureEndpoint(GenericEndpoint.Delete, endpoint =>
                   endpoint.WithTags("Delete"));
        });

        IncludeNamespace<CheckProductStock>();
    }
}
// Program.cs
using FastSharp.Modules;
using Microsoft.EntityFrameworkCore;
using YourProject.Data;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<YourDbContext>(opt =>
    opt.UseInMemoryDatabase("MyDatabase"));

// Add FastSharp to the dependency container
builder.Services.AddFastSharpEndpoints();

builder.Services.AddOpenApi();

var app = builder.Build();

// Map FastSharp endpoints
app.MapFastSharpEndpoints();

if (app.Environment.IsDevelopment())
{
    app.MapOpenApi();
}

app.UseHttpsRedirection();
app.Run();

Docs


License / Licencia

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
1.0.0-beta.16 79 7/28/2026
1.0.0-beta.12 125 6/11/2026
1.0.0-beta.11 72 5/29/2026
1.0.0-beta.8 73 4/14/2026
1.0.0-beta.7 74 4/1/2026
1.0.0-beta.6 69 3/31/2026
1.0.0-beta.5 66 3/31/2026
1.0.0-beta.4 68 3/23/2026
1.0.0-beta.3 69 3/21/2026
1.0.0-beta.2 79 2/21/2026
1.0.0-alpha.4 82 2/12/2026
1.0.0-alpha.1 81 2/11/2026