Share via


ODataConventionModelBuilder.AddSingleton Method

Definition

Registers a singleton as a part of the model and returns an object that can be used to configure the singleton. This method can be called multiple times for the same type to perform multiple lines of configuration.

public override Microsoft.AspNet.OData.Builder.SingletonConfiguration AddSingleton (string name, Microsoft.AspNet.OData.Builder.EntityTypeConfiguration entityType);
override this.AddSingleton : string * Microsoft.AspNet.OData.Builder.EntityTypeConfiguration -> Microsoft.AspNet.OData.Builder.SingletonConfiguration
Public Overrides Function AddSingleton (name As String, entityType As EntityTypeConfiguration) As SingletonConfiguration

Parameters

name
String

The name of the singleton.

entityType
EntityTypeConfiguration

The type to be registered or configured.

Returns

The configuration object for the specified singleton.

Applies to