KeySegmentTemplate Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a template that could match a key segment.
public class KeySegmentTemplate : Microsoft.AspNetCore.OData.Routing.Template.ODataSegmentTemplate
type KeySegmentTemplate = class
inherit ODataSegmentTemplate
Public Class KeySegmentTemplate
Inherits ODataSegmentTemplate
- Inheritance
Constructors
KeySegmentTemplate(IDictionary<String,String>, IEdmEntityType, IEdmNavigationSource) |
Initializes a new instance of the KeySegmentTemplate class. |
KeySegmentTemplate(KeySegment, IDictionary<String,IEdmProperty>) |
Initializes a new instance of the KeySegmentTemplate class. Typically, it's for alternate key scenario. |
KeySegmentTemplate(KeySegment) |
Initializes a new instance of the KeySegmentTemplate class. |
Properties
Count |
Gets the key count |
EntityType |
Gets the entity type declaring this key. |
KeyMappings |
Gets the dictionary representing the mappings from the key names in the current key segment to the key names in route data. the key in dict could be the string used in request the value in dict could be the string used in action of controller |
KeyProperties |
Gets the keys. The key of dictionary is the key name or alias. The value of dictionary is the key property, it could be property on entity type or sub property on complex property. |
NavigationSource | System.Object.NavigationSource |
Methods
GetTemplates(ODataRouteOptions) |
Gets the templates. It's case-insensitive template. It's used to build the routing template in conventional routing. It's not used in attribute routing. The template string should include the leading "/" if apply. |
TryTranslate(ODataTemplateTranslateContext) |
Translate the template into a real OData path segment ODataPathSegment |