ODataModelBuilder.Singleton<TEntityType> Method (String)
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.
Namespace: System.Web.OData.Builder
Assembly: System.Web.OData (in System.Web.OData.dll)
Syntax
public SingletonConfiguration<TEntityType> Singleton<TEntityType>(
string name
)
where TEntityType : class
public:
generic<typename TEntityType>
where TEntityType : ref class
SingletonConfiguration<TEntityType>^ Singleton(
String^ name
)
member Singleton<'TEntityType when 'TEntityType : not struct> :
name:string -> SingletonConfiguration<'TEntityType>
Public Function Singleton(Of TEntityType As Class) (
name As String
) As SingletonConfiguration(Of TEntityType)
Parameters
name
Type: System.StringThe name of the singleton.
Return Value
Type: System.Web.OData.Builder.SingletonConfiguration<TEntityType>
The configuration object for the specified singleton.
Type Parameters
- TEntityType
The entity type of the singleton.
See Also
ODataModelBuilder Class
System.Web.OData.Builder Namespace
Return to top