| 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 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 forgRPC or SignalR |
✅ You could have the same Manager to handle REST, gRPC,and a SignalR simultaneously |
| ⛔ Paging and Sorting should be written for every controller separately |
✅ Paging and sorting are implemented out of the box in the uniform manner |
| ⛔ Controller method can't be easily switched on/off | ✅ It is possible to use some of CRUD or BULK CRUD methods easily (switch them off and back on from routing and API Explorer) |
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.:
- Generate assembly:
Assembly stationControllerAssembly = services.AddSimplifiedAutoController<StationEntity, Guid, EmptyAdditionalFilters>(
provider.GetRequiredService<ModelContext>(), "Station",
ControllerType.FullCrud, null, provider.GetRequiredService<ILoggerFactory>());- Add Controller from assembly:
services.AddControllers().AddApplicationPart(stationControllerAssembly).AddControllersAsServices();-
🔥
REST API Controllerwith fullCRUDcontains only 20 lines of code (~ 10 are imports)GETmethods have built-in paging support;GETmethods have built-in sorting and filter by query parameters;
-
🚀 BULK operations with objects (Bulk
Create,UpdateandDelete) on a Controller && interface level -
🧠 support to work with any persistent storage (
IModelManagerinterface); Good built-in EntityFramework support (seeEfModelManagerclass). 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 Storageand previously withCloudflare R2andAmazon S3)
-
🆒
Bulkvs 🙅♂️ Non-Bulk,Wissance.WebApiToolkithas Bulk out of the box: -
🛠️ it is possibly to switch some or even all default
CRUDorBULKmethods from controller by settingAllowedOperationattribute see the docs
- 😱 Elapsed time in Non-Bulk REST API with EF is ~976 ms.
- 🔥 Elapsed time in Bulk API with EF is ~4 ms.
✨ Result : Bulk API is almost ~250 x faster!
You could see our articles about Toolkit usage:
- ✍️ Medium article about v1.0.x usage
- ✍️ Dev.to article about v1.0.x usage
- ✍️ One line for full CRUD Medium article
- Created base controllers for ReadOnly (get many, get one) and FullCRUD (
ReadOnly+Create+Update+Delete) operations. - Created base controllers for CRUD BULK operation (
~/api/bulk) . - Created a common interface for passing paging and sorting.
- Added support for controllers creation with
EntityFrameworkas a DB technology. - Supported
API Explorationswith show all query parameters inswagger. - Supported the creation of
gRPCservices based onIModelManager.
WebAPIToolkitproject was separated onWebAPIToolkit.Corewith interface parts only, and this part is independent from database techology.- Added support for operation with files, either a local or network holder or
S3 AWS Compatible Cloud Storage.
Version 4.x.x is active to support important features for outdated .Net plafrorms (.netcoreapp3.1 and .net5.0)
- Removed support of
.netcoreapp3.1and.net5.0 - Added support for the
net9.0 - Updated package version to keep
net6.0
- Generation tools development and it is possible to create Controllers dynamically with up to 1 line of code
- GitHub actions for CI (
Build +test run) - Added an additional method for
1-linecontroller add that has a factory func, to return a different result from methods Create&&Updatefactory methods are having nowDbContextfor proper working withmany-2-manyby default
- Added ability to easily switch off by attribute from routing any methods of base controllers


