">
Download presentation
Presentation is loading. Please wait.
Published byThomas Felix Doyle Modified over 9 years ago
1
ASSOCIATION SIMPLIFICATION
2
ISSUES WITH ASSOCIATIONS Defining Associations (and association sets) in order to represent links is cumbersome Associations are bi-directional Difficult to do Composition Want to model root as a single entity
3
ASSOCIATIONS TODAY <NavigationProperty Name="Titles" Relationship="Netflix.Catalog.v2.Genre_Titles" ToRole="Genre_Titles_Target" FromRole="Genre_Titles_Source" /> <NavigationProperty Name="Genre" Relationship="Netflix.Catalog.v2.Genre_Titles" ToRole="Genre_Titles_Source" FromRole="Genre_Titles_Target" /> <NavigationProperty Name="Titles" Relationship="Netflix.Catalog.v2.Genre_Titles" ToRole="Genre_Titles_Target" FromRole="Genre_Titles_Source" /> <NavigationProperty Name="Genre" Relationship="Netflix.Catalog.v2.Genre_Titles" ToRole="Genre_Titles_Source" FromRole="Genre_Titles_Target" />
4
HOW ASSOCIATIONS COULD LOOK <NavigationProperty Name="Titles" Type="Collection(Netflix.Catalog.V2.Title)" Partner="Genre"/> <NavigationProperty Name="Genre" Type"Netflix.Catalog.v2.Genre" nullable="false" Partner="Titles"/> <NavigationProperty Name="Titles" Type="Collection(Netflix.Catalog.V2.Title)" Partner="Genre"/> <NavigationProperty Name="Genre" Type"Netflix.Catalog.v2.Genre" nullable="false" Partner="Titles"/>
5
ROOT ENTITY Often you have a single root element, with properties, with relationships to other EntitySets Model as a "Named Entity" rooted at the entity container:
6
CHANGES Support specifying Type, Nullability, Partner in Navigation Property Partner may be optional Specify NavigationPropertyBinding in EntitySet Binding may be optional Addition of "Top Level Entity" Supports root entity
7
BENEFITS Simpler to read Information is localized where you expect to find it Enables one-way relationships Makes it easier to support Composition Doesn't change OData semantics, behavior, etc.
8
DISCUSSION Instead of root element make the EntityContainer an entity type
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.