Share via


EntitySetController<TEntity, TKey> Class

Provides a convenient starting point for a controller that exposes an OData entity set. This is the synchronous version of AsyncEntitySetController<TEntity, TKey>.

This API is not CLS-compliant. 

Inheritance Hierarchy

System.Object
  System.Web.Http.ApiController
    System.Web.Http.OData.ODataController
      System.Web.Http.OData.EntitySetController<TEntity, TKey>

Namespace:  System.Web.Http.OData
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
<ODataNullValueAttribute> _
Public MustInherit Class EntitySetController(Of TEntity As Class, TKey) _
    Inherits ODataController
'Usage
Dim instance As EntitySetController(Of TEntity, TKey)
[CLSCompliantAttribute(false)]
[ODataNullValueAttribute]
public abstract class EntitySetController<TEntity, TKey> : ODataController 
where TEntity : class
[CLSCompliantAttribute(false)]
[ODataNullValueAttribute]
generic<typename TEntity, typename TKey>
where TEntity : ref class 
public ref class EntitySetController abstract : public ODataController
[<AbstractClassAttribute>]
[<CLSCompliantAttribute(false)>]
[<ODataNullValueAttribute>]
type EntitySetController<'TEntity, 'TKey when 'TEntity : not struct> =  
    class 
        inherit ODataController 
    end
JScript does not support generic types and methods.

Type Parameters

  • TEntity
    The type associated with the exposed entity set's entity type.
  • TKey
    The type associated with the entity key of the exposed entity set's entity type.

The EntitySetController<TEntity, TKey> type exposes the following members.

Constructors

  Name Description
Protected method EntitySetController<TEntity, TKey> Initializes a new instance of the EntitySetController<TEntity, TKey> class.

Top

Properties

  Name Description
Public property Configuration (Inherited from ApiController.)
Public property ControllerContext (Inherited from ApiController.)
Public property ModelState (Inherited from ApiController.)
Public property ODataPath Gets the OData path of the current request.
Public property QueryOptions Gets the OData query options of the current request.
Public property Request (Inherited from ApiController.)
Public property RequestContext (Inherited from ApiController.)
Public property Url (Inherited from ApiController.)
Public property User (Inherited from ApiController.)

Top

Methods

  Name Description
Protected method BadRequest() (Inherited from ApiController.)
Protected method BadRequest(String) (Inherited from ApiController.)
Protected method BadRequest(ModelStateDictionary) (Inherited from ApiController.)
Protected method Conflict (Inherited from ApiController.)
Protected method Content<T>(HttpStatusCode, T) (Inherited from ApiController.)
Protected method Content<T>(HttpStatusCode, T, MediaTypeFormatter) (Inherited from ApiController.)
Protected method Content<T>(HttpStatusCode, T, MediaTypeFormatter, String) (Inherited from ApiController.)
Protected method Content<T>(HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue) (Inherited from ApiController.)
Protected method Created<TEntity>(TEntity) Creates an action result with the specified values that is a response to a POST operation with an entity to an entity set. (Inherited from ODataController.)
Protected method Created<T>(String, T) (Inherited from ApiController.)
Protected method Created<T>(Uri, T) (Inherited from ApiController.)
Protected method CreatedAtRoute<T>(String, Object, T) (Inherited from ApiController.)
Protected method CreatedAtRoute<T>(String, IDictionary<String, Object>, T) (Inherited from ApiController.)
Protected method CreateEntity This method should be overridden to create a new entity in the entity set.
Public method CreateLink This method should be overridden to handle POST and PUT requests that attempt to create a link between two entities.
Public method Delete This method should be overridden to handle DELETE requests for deleting existing entities from the entity set.
Public method DeleteLink(TKey, String, String) This method should be overridden to handle DELETE requests that attempt to break a relationship between two entities.
Public method DeleteLink(TKey, String, Uri) This method should be overridden to handle DELETE requests that attempt to break a relationship between two entities.
Public method Dispose() (Inherited from ApiController.)
Protected method Dispose(Boolean) (Inherited from ApiController.)
Public method Equals (Inherited from Object.)
Public method ExecuteAsync (Inherited from ApiController.)
Protected method Finalize (Inherited from Object.)
Public method Get() This method should be overridden to handle GET requests that attempt to retrieve entities from the entity set.
Public method Get(TKey) Handles GET requests that attempt to retrieve an individual entity by key from the entity set.
Protected method GetEntityByKey This method should be overridden to retrieve an entity by key from the entity set.
Public method GetHashCode (Inherited from Object.)
Protected method GetKey This method should be overridden to get the entity key of the specified entity.
Public method GetType (Inherited from Object.)
Public method HandleUnmappedRequest This method should be overridden to handle all unmapped OData requests.
Protected method Initialize (Inherited from ApiController.)
Protected method InternalServerError() (Inherited from ApiController.)
Protected method InternalServerError(Exception) (Inherited from ApiController.)
Protected method Json<T>(T) (Inherited from ApiController.)
Protected method Json<T>(T, JsonSerializerSettings) (Inherited from ApiController.)
Protected method Json<T>(T, JsonSerializerSettings, Encoding) (Inherited from ApiController.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method NotFound (Inherited from ApiController.)
Protected method Ok() (Inherited from ApiController.)
Protected method Ok<T>(T) (Inherited from ApiController.)
Public method Patch Handles PATCH and MERGE requests to partially update a single entity in the entity set.
Protected method PatchEntity This method should be overridden to apply a partial update to an existing entity in the entity set.
Public method Post Handles POST requests that create new entities in the entity set.
Public method Put Handles PUT requests that attempt to replace a single entity in the entity set.
Protected method Redirect(String) (Inherited from ApiController.)
Protected method Redirect(Uri) (Inherited from ApiController.)
Protected method RedirectToRoute(String, Object) (Inherited from ApiController.)
Protected method RedirectToRoute(String, IDictionary<String, Object>) (Inherited from ApiController.)
Protected method ResponseMessage (Inherited from ApiController.)
Protected method StatusCode (Inherited from ApiController.)
Public method ToString (Inherited from Object.)
Protected method Unauthorized(array<AuthenticationHeaderValue[]) (Inherited from ApiController.)
Protected method Unauthorized(IEnumerable<AuthenticationHeaderValue>) (Inherited from ApiController.)
Protected method Updated<TEntity> Creates an action result with the specified values that is a response to a PUT, PATCH, or a MERGE operation on an OData entity. (Inherited from ODataController.)
Protected method UpdateEntity This method should be overridden to update an existing entity in the entity set.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Http.OData Namespace