DbDataController<TContext> Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

DataController base class for use with LINQ To Entities Code First data models.

Inheritance Hierarchy


Namespace:  System.Web.Http.Data.EntityFramework
Assembly:  System.Web.Http.Data.EntityFramework (in System.Web.Http.Data.EntityFramework.dll)


<DbMetadataProviderAttribute> _
Public MustInherit Class DbDataController(Of TContext As {New, DbContext}) _
    Inherits DataController
public abstract class DbDataController<TContext> : DataController
where TContext : new(), DbContext
generic<typename TContext>
where TContext : gcnew(), DbContext
public ref class DbDataController abstract : public DataController
type DbDataController<'TContext when 'TContext : new() and DbContext> =  
        inherit DataController
JScript does not support generic types or methods.

Type Parameters

  • TContext

The DbDataController<TContext> type exposes the following members.


  Name Description
Protected method DbDataController<TContext> Initializes a new instance of the DbDataController<TContext> class.



  Name Description
Protected property ActionContext Gets the HttpActionContext for the currently executing action. (Inherited from DataController.)
Protected property ChangeSet Gets the current ChangeSet. (Inherited from DataController.)
Public property Configuration (Inherited from ApiController.)
Public property ControllerContext (Inherited from ApiController.)
Protected property DbContext Gets the DbContext.
Protected property Description Gets the DataControllerDescription for this DataController. (Inherited from DataController.)
Public property ModelState (Inherited from ApiController.)
Public property Request (Inherited from ApiController.)
Public property Url (Inherited from ApiController.)



  Name Description
Protected method AuthorizeChangeSet Verifies that the user is authorized to submit the current ChangeSet. (Inherited from DataController.)
Protected method CreateDbContext Returns the DbContext object.
Protected method DeleteEntity Deletes an entity from the DbContext, ensuring that its EntityState is Deleted.
Public method Dispose() (Inherited from ApiController.)
Protected method Dispose(Boolean) Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Overrides ApiController.Dispose(Boolean).)
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method ExecuteAsync Executes data controller in an asynchronous manner. (Inherited from DataController.)
Protected method ExecuteChangeSet Invokes the action for each operation in the current ChangeSet. (Inherited from DataController.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Initialize Initializes the data controller. (Overrides DataController.Initialize(HttpControllerContext).)
Protected method InsertEntity Inserts an entity into the DbContext, ensuring its EntityState is Added.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method PersistChangeSet Finalizes changes after all the operations in the specified changeset have been invoked. (Overrides DataController.PersistChangeSet().)
Protected method ResolveConflicts Finalizes changes after all the operations in the specified changeset have been invoked.
Public method Submit Performs the operations indicated by the specified ChangeSet by invoking the corresponding actions for each. (Inherited from DataController.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method UpdateEntity Updates an entity in the DbContext, ensuring it is treated as a modified entity.
Protected method ValidateChangeSet Validates the current ChangeSet. (Inherited from DataController.)


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


System.Web.Http.Data.EntityFramework Namespace