ODataModelBuilder.AddEntitySet Method
Registers an entity set as a part of the model and returns an object that can be used to configure the entity set. This method can be called multiple times for the same type to perform multiple lines of configuration.
Namespace: System.Web.Http.OData.Builder
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
'Declaration
Public Overridable Function AddEntitySet ( _
name As String, _
entityType As EntityTypeConfiguration _
) As EntitySetConfiguration
'Usage
Dim instance As ODataModelBuilder
Dim name As String
Dim entityType As EntityTypeConfiguration
Dim returnValue As EntitySetConfiguration
returnValue = instance.AddEntitySet(name, _
entityType)
public virtual EntitySetConfiguration AddEntitySet(
string name,
EntityTypeConfiguration entityType
)
public:
virtual EntitySetConfiguration^ AddEntitySet(
String^ name,
EntityTypeConfiguration^ entityType
)
abstract AddEntitySet :
name:string *
entityType:EntityTypeConfiguration -> EntitySetConfiguration
override AddEntitySet :
name:string *
entityType:EntityTypeConfiguration -> EntitySetConfiguration
public function AddEntitySet(
name : String,
entityType : EntityTypeConfiguration
) : EntitySetConfiguration
Parameters
- name
Type: System.String
The name of the entity set.
- entityType
Type: System.Web.Http.OData.Builder.EntityTypeConfiguration
The type to be registered or configured.
Return Value
Type: System.Web.Http.OData.Builder.EntitySetConfiguration
The configuration object for the specified entity set.