Click or drag to resize

ModelControllerT Class

Base Class for A Webcontroller that provides common Model endpoints such as Edit, Delete, Search.
Inheritance Hierarchy
SystemObject
  ApiController
    GSF.Web.ModelModelControllerT, T
      GSF.Web.ModelModelControllerT

Namespace: GSF.Web.Model
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.207-beta
Syntax
public class ModelController<T> : ModelController<T, T>
where T : class, new()
View Source

Type Parameters

T
The corresponding Model.

The ModelControllerT type exposes the following members.

Constructors
 NameDescription
Public methodModelControllerTInitializes a new instance of the ModelControllerT class
Top
Properties
 NameDescription
Public propertyActionContextGets the action context.
(Inherited from ApiController)
Protected propertyAllowSearch
(Inherited from ModelControllerT, U)
Protected propertyClaims
(Inherited from ModelControllerT, U)
Public propertyConfigurationGets the HttpConfiguration of the current ApiController.
(Inherited from ApiController)
Protected propertyConnection
(Inherited from ModelControllerT, U)
Public propertyControllerContextGets the HttpConfiguration of the current ApiController.
(Inherited from ApiController)
Protected propertyCustomView
(Inherited from ModelControllerT, U)
Protected propertyDefaultSort
(Inherited from ModelControllerT, U)
Protected propertyDeleteRoles
(Inherited from ModelControllerT, U)
Protected propertyGetRoles
(Inherited from ModelControllerT, U)
Public propertyModelStateGets the model state after the model binding process.
(Inherited from ApiController)
Protected propertyParentKey
(Inherited from ModelControllerT, U)
Protected propertyPatchRoles
(Inherited from ModelControllerT, U)
Protected propertyPostRoles
(Inherited from ModelControllerT, U)
Protected propertyPrimaryKeyField
(Inherited from ModelControllerT, U)
Public propertyRequestGets or sets the HttpRequestMessage of the current ApiController.
(Inherited from ApiController)
Public propertyRequestContextGets the request context.
(Inherited from ApiController)
Protected propertyRootQueryRestriction
(Inherited from ModelControllerT, U)
Protected propertySearchSettings
(Inherited from ModelControllerT, U)
Protected propertySQLSearchModifier
(Inherited from ModelControllerT, U)
Protected propertyTake
(Inherited from ModelControllerT, U)
Public propertyUrlGets an instance of a UrlHelper, which is used to generate URLs to other APIs.
(Inherited from ApiController)
Public propertyUserReturns the current principal associated with this request.
(Inherited from ApiController)
Protected propertyViewOnly
(Inherited from ModelControllerT, U)
Top
Methods
 NameDescription
Protected methodBadRequestCreates a BadRequestResult.
(Inherited from ApiController)
Protected methodBadRequest(ModelStateDictionary)Creates an InvalidModelStateResult with the specified model state.
(Inherited from ApiController)
Protected methodBadRequest(String)Creates an ErrorMessageResult (400 Bad Request) with the specified error message.
(Inherited from ApiController)
Protected methodBuildWhereClause
(Inherited from ModelControllerT, U)
Protected methodConflictCreates a ConflictResult (409 Conflict).
(Inherited from ApiController)
Protected methodContent``1(HttpStatusCode, UMP)Creates a <see cref="T:System.Web.Http.NegotiatedContentResult`1" /> with the specified values.
(Inherited from ApiController)
Protected methodContent``1(HttpStatusCode, UMP, MediaTypeFormatter)Creates a <see cref="T:System.Web.Http.FormattedContentResult`1" /> with the specified values.
(Inherited from ApiController)
Protected methodContent``1(HttpStatusCode, UMP, MediaTypeFormatter, MediaTypeHeaderValue)Creates a <see cref="T:System.Web.Http.FormattedContentResult`1" /> with the specified values.
(Inherited from ApiController)
Protected methodContent``1(HttpStatusCode, UMP, MediaTypeFormatter, String)Creates a <see cref="T:System.Web.Http.FormattedContentResult`1" /> with the specified values.
(Inherited from ApiController)
Protected methodCountSearchResults Counts the number of records with the SearchResults as specified in ModelControllerT, UPostData.
(Inherited from ModelControllerT, U)
Protected methodCreated``1(String, UMP)Creates a CreatedNegotiatedContentResult (201 Created) with the specified values.
(Inherited from ApiController)
Protected methodCreated``1(Uri, UMP)Creates a CreatedNegotiatedContentResult (201 Created) with the specified values.
(Inherited from ApiController)
Protected methodCreatedAtRoute``1(String, IDictionaryString, Object, UMP)Creates a CreatedAtRouteNegotiatedContentResult (201 Created) with the specified values.
(Inherited from ApiController)
Protected methodCreatedAtRoute``1(String, Object, UMP)Creates a CreatedAtRouteNegotiatedContentResult (201 Created) with the specified values.
(Inherited from ApiController)
Public methodDelete Deletes an existing Record.
(Inherited from ModelControllerT, U)
Protected methodDeleteAuthCheck Check if current User is authorized for DELETE Requests
(Inherited from ModelControllerT, U)
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from ApiController)
Protected methodDispose(Boolean)Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources.
(Inherited from ApiController)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExecuteAsyncExecutes asynchronously a single HTTP operation.
(Inherited from ApiController)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGet(String) Gets all records from associated table, filtered to parent key ID if provided
(Inherited from ModelControllerT, U)
Public methodGet(String, Int32) Gets a sorted list of T.
(Inherited from ModelControllerT, U)
Public methodGet(String, String, Int32) Gets all records from associated table, filtered to parent key ID if provided, sorted by the provided Field.
(Inherited from ModelControllerT, U)
Protected methodGetAuthCheck Check if current User is authorized for GET Requests
(Inherited from ModelControllerT, U)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetNew Used to get an empty record
(Inherited from ModelControllerT, U)
Public methodGetOne Gets record from associated table with a primary key matching the id provided.
(Inherited from ModelControllerT, U)
Public methodGetPagedList(ModelControllerT, UPostData, Int32) Gets a subset of records from associated table, filtered and sorted as defined in postData. based on Take and 0-based page index
(Inherited from ModelControllerT, U)
Public methodGetPagedList(ModelControllerT, UPostData, Int32, String) Gets a subset of records from associated table, filtered and sorted as defined in postData. based on Take and 0-based page index
(Inherited from ModelControllerT, U)
Public methodGetSearchableList(ModelControllerT, UPostData) Gets all records from associated table, filtered and sorted as defined in postData.
(Inherited from ModelControllerT, U)
Public methodGetSearchableList(ModelControllerT, UPostData, String) Gets all records from associated table, filtered and sorted as defined in postData.
(Inherited from ModelControllerT, U)
Protected methodGetSearchResults Gets the DataTable with the SearchResults as specified in ModelControllerT, UPostData.
(Inherited from ModelControllerT, U)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodInitializeInitializes the ApiController instance with the specified controllerContext.
(Inherited from ApiController)
Protected methodInternalServerErrorCreates an InternalServerErrorResult (500 Internal Server Error).
(Inherited from ApiController)
Protected methodInternalServerError(Exception)Creates an ExceptionResult (500 Internal Server Error) with the specified exception.
(Inherited from ApiController)
Protected methodJson``1(UMP)Creates a JsonResult (200 OK) with the specified value.
(Inherited from ApiController)
Protected methodJson``1(UMP, JsonSerializerSettings)Creates a JsonResult (200 OK) with the specified values.
(Inherited from ApiController)
Protected methodJson``1(UMP, JsonSerializerSettings, Encoding)Creates a JsonResult (200 OK) with the specified values.
(Inherited from ApiController)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodNotFoundCreates a NotFoundResult.
(Inherited from ApiController)
Protected methodOkCreates an OkResult (200 OK).
(Inherited from ApiController)
Protected methodOk``1(UMP)Creates an OkNegotiatedContentResult with the specified values.
(Inherited from ApiController)
Public methodPatch Updates an existing Record.
(Inherited from ModelControllerT, U)
Protected methodPatchAuthCheck Check if current User is authorized for PATCH Requests
(Inherited from ModelControllerT, U)
Public methodPost Adds a new Record.
(Inherited from ModelControllerT, U)
Protected methodPostAuthCheck Check if current User is authorized for POST Requests
(Inherited from ModelControllerT, U)
Protected methodQueryRecords
(Inherited from ModelControllerT, U)
Protected methodQueryRecords(String, Boolean)
(Inherited from ModelControllerT, U)
Protected methodQueryRecordsWhere(String, Object)
(Inherited from ModelControllerT, U)
Protected methodQueryRecordsWhere(String, Boolean, String, Object)
(Inherited from ModelControllerT, U)
Protected methodQueryRecordWhere
(Inherited from ModelControllerT, U)
Protected methodRedirect(String)Creates a redirect result (302 Found) with the specified value.
(Inherited from ApiController)
Protected methodRedirect(Uri)Creates a redirect result (302 Found) with the specified value.
(Inherited from ApiController)
Protected methodRedirectToRoute(String, IDictionaryString, Object)Creates a redirect to route result (302 Found) with the specified values.
(Inherited from ApiController)
Protected methodRedirectToRoute(String, Object)Creates a redirect to route result (302 Found) with the specified values.
(Inherited from ApiController)
Protected methodResponseMessageCreates a ResponseMessageResult with the specified response.
(Inherited from ApiController)
Protected methodStatusCodeCreates a StatusCodeResult with the specified status code.
(Inherited from ApiController)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Protected methodUnauthorized(AuthenticationHeaderValue)Creates an UnauthorizedResult (401 Unauthorized) with the specified values.
(Inherited from ApiController)
Protected methodUnauthorized(IEnumerableAuthenticationHeaderValue)Creates an UnauthorizedResult (401 Unauthorized) with the specified values.
(Inherited from ApiController)
Public methodValidate``1(UMP)Validates the given entity and adds the validation errors to the model state under the empty prefix, if any.
(Inherited from ApiController)
Public methodValidate``1(UMP, String)Validates the given entity and adds the validation errors to the model state, if any.
(Inherited from ApiController)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also