User Tools

Site Tools


Sidebar

Nebol Software Projects:

.NET Class Libraries

Contact info:

johan@nebol.se

nebolcontroller

NebolController

NebolController is a simple framework for your C# REST API controllers

NebolController offers advantages over the basic ApiController such as:

  • Built-in methods for CRUD functionality. Without adding a single line you will get fully working methods for GET/{id}, GET (list), PUT, POST and DELETE methods for your controller
  • FILTER method for advanced filtering of data according to JSON-formatted parameters, including pagination and sorting.
  • Hooks for more advanced pre/post-processing of queries and results. There are methods you can override to specify how the database queries should be created, how to execute and to perform post-processing on the result.
  • Consistent behaviour in all controllers. All your controllers will behave in a manner in a predictable manner, which us extremely useful for the front-end development.
  • Less boilerplate code, less work. Less boilerplate means less redundancy and less risk of mistakes.
  • Integration with SharpRepository and AutoMapper. AutoMapper is the premier object mapping solution (mapping database objects to view objects and vice versa). SharpRepository is full-featured generic repository which includes support for EF and many other kinds of storage.
  • Optional compression of response data

Comments about package versions: NebolController uses AutoMapper 7. Version 8+ of AutoMapper requires net461 so if I upgrade the version in NebolController then it would lose support for net45 to net46. You are still free to use AutoMapper 8+ in your net461 application though, no problem.

Step-by-step guides on how to use NebolController:

NebolController_Books_NETFramework

NebolController_Books_NETCore

NebolController_NETCore_MSSQL_Adjustments

nebolcontroller.txt · Last modified: 2021/07/31 10:56 by nebol