-
Notifications
You must be signed in to change notification settings - Fork 8
Wissance.WebApiToolkit wiki
Wissance.WebApiToolkit is a set of libraries that helps to build WebAPI faster with a standardized manner and approach. We told WebAPI therefore we mean not only REST but also gRPC and SignalR too. Wissance.WebApiToolkit is well structured and contains reusable parts that allow you to combine them and extend default behavior. Core interfaces of Wissance.WebApiToolkit are independent from any specific technology and could be easily implemented with different techologies. There are full examples of usage, see Examples section
Solution contains multiple projects, the most important are:
-
Wissance.WebApiToolkit.Corecore interfaces and classes that minimally depend on libs and frameworks that are not part of FCL. -
Wissance.WebApiToolkit.Efimplementations of base Core interfaces based onEntityFrameworkfor managing persistent data -
Wissance.WebApiToolkit.AWS.S3implementation of theIFileManagerand other utils for working with files and directories with different S3 Cloud services (AWS,Cloudflare R2,Yandexand many others compatible byAPIwithAmazon)
Wissance.WebApiToolkit structure is shown in the picture below:

There are following main concepts:
- The system is split on 3 main levels:
DTO/Message,Controller/Service, andManager - All controller base operations are related to a specific
TObjclass (same for all operations). - The result of the operation is represented with a
DTO/Messageobject except for theDeleteoperation. - There is an additional branch (file management) that does not yet have a generic controller (maybe in the future)
- Translation from
TObjtoTResand back is performed byFactoryclasses
Therefore the main algorithm to create Application with WebApiToolkit:
Therefore, the main algorithm to create an application with WebApiToolkit:
- Create a set of entity classes (
TObj/TData) that implements theIModelIdentifiableinterface - Create a set of entity representations as
TRes(DTO) likeTRes Create(TObjentity) - Create a set of manager classes for pairs (
TRes,TObj) - Create controllers that derives from
BasicReadController,BasicCrudController, orBasicBulkCrudControlleror service corresponding to these Controllers classes.
Using Wissance.WebApiToolkit.Ef we can simplify all these steps and create controllers just with one line of code and TObj entity classes, but there are some limitations to such instant API creation; see here
...tbd
...tbd