Skip to main content

eqcontrollerbaseextentions-class

Contains useful expression which allows to build some specific IActionResult objects.

public static class Korzh.EasyQuery.AspNetCore.EqControllerBaseExtentions

Assembly: Korzh.EasyQuery.AspNetCore.dll

Static Methods

NameTypeDescription
EqError(this ControllerBase controller, string message, int statusCode = 400)EqErrorResultAn extension function which returns an action result with error status code and some additional message (in JSON) in the response body in EasyQuery format.
EqOk(this ControllerBase controller, object data)EqOkResultAn extension function which returns an action result with 200 (OK) status code and some additional data (in JSON) in the response body in EasyQuery format.