Wissance.WebApiToolkit.Ef 5.2.0

dotnet add package Wissance.WebApiToolkit.Ef --version 5.2.0
                    
NuGet\Install-Package Wissance.WebApiToolkit.Ef -Version 5.2.0
                    
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="Wissance.WebApiToolkit.Ef" Version="5.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wissance.WebApiToolkit.Ef" Version="5.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Wissance.WebApiToolkit.Ef" />
                    
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 Wissance.WebApiToolkit.Ef --version 5.2.0
                    
#r "nuget: Wissance.WebApiToolkit.Ef, 5.2.0"
                    
#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 Wissance.WebApiToolkit.Ef@5.2.0
                    
#: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=Wissance.WebApiToolkit.Ef&version=5.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Wissance.WebApiToolkit.Ef&version=5.2.0
                    
Install as a Cake Tool

Wissance.WebApiToolkit

Awesome GitHub code size in bytes GitHub issues GitHub Release Date

  • Core Nuget Downloads
  • Ef extensions NugetDownloads
  • Cloud AWS S3 utils NugetDownloads

WebApiToolkit helps to build application easily

One Line of code for Fully functional CRUD Controller with Swagger doc

1 line to add controller

Why Wissance.WebApiToolkit

Without With Wissance.WebApiToolkit
⛔ Manual support for the API uniformity ✅ Output of all REST methods is standardize
⛔ Every Controller requires at least 20 min to be written ✅ Up to one line of code for fully functional CRUD
⛔ Inconsistent error response ✅ Unified error format out of the box
⛔ Requires to rewrite controllers to add a new<br/> technology ✅ Requires only a new Manager class
⛔ Not supporting bulk operation by default ✅ Up to one line of code for fully functional BULK API
⛔ Controller logic can't be easily used for<br/>gRPC or SignalR ✅ You could have the same Manager to<br/> handle REST, gRPC,and a SignalR simultaneously
⛔ Paging and Sorting should be written for<br/>every controller separately ✅ Paging and sorting are implemented<br/> out of the box in the uniform manner

Minimal example

For the full doc see the 📚 project wiki, to add in one line, for example i break it to Assembly get and add Controller, i.e.:

  1. Generate assembly:
Assembly stationControllerAssembly = services.AddSimplifiedAutoController<StationEntity, Guid, EmptyAdditionalFilters>(
                provider.GetRequiredService<ModelContext>(), "Station",
                ControllerType.FullCrud, null, provider.GetRequiredService<ILoggerFactory>());
  1. Add Controller from assembly:
services.AddControllers().AddApplicationPart(stationControllerAssembly).AddControllersAsServices();

Key Features

  • 🔥 REST API Controller with full CRUD contains only 20 lines of code (~ 10 are imports)
    • GET methods have built-in paging support;
    • GET methods have built-in sorting and filter by query parameters;
  • 🚀 BULK operations with objects (Bulk Create, Update and Delete) on a Controller && interface level
  • 🧠 support to work with any persistent storage (IModelManager interface); Good built-in EntityFramework support (see EfModelManager class). See WeatherControl App which has
  • 🎨 Manager classes that support file operation over:
    • web folders (folders from mounted devices or just local folders)
    • S3 AWS-compatible (tested with Yandex Object Storage and previously with Cloudflare R2 and Amazon S3)

🆒 Bulk vs 🙅‍♂️ Non-Bulk, Wissance.WebApiToolkit has Bulk out of the box:

Bulk vs Non Bulk

  • 😱 Elapsed time in Non-Bulk REST API with EF is <span style="color:red">~976 ms.</span>
  • 🔥 Elapsed time in Bulk API with EF is <span style="color:green">~4 ms.</span>

✨ Result : Bulk API is almost <span style="color:green">~250 x faster</span>!

Additional materials (Post, articles, video)

You could see our articles about Toolkit usage:

Contributors

<a href="https://github.com/Wissance/WebApiToolkit/graphs/contributors"> <img src="https://contrib.rocks/image?repo=Wissance/WebApiToolkit" /> </a>

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 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
5.2.0 35 11/8/2025
5.1.0 215 8/29/2025
5.0.0 149 8/15/2025
4.0.1 141 8/15/2025
4.0.0 166 8/15/2025

In this version it is possible to create controllers via 1-line-code with custom Dto and Create/Update factory delegates have additional param to get DbContext that allows to create/update objects by default with many-2-many relations