Example #1
0
 private static void AddReferenceNavigationColumns(List <EntityDataSourceColumn> columns, MetadataWorkspace ocWorkspace, EntitySet entitySet, EntityType entityType)
 {
     foreach (AssociationSetEnd toEnd in GetReferenceEnds(entitySet, entityType, /*forKey*/ false))
     {
         // Check for a navigation property
         NavigationProperty navigationProperty;
         if (TryGetCorrespondingNavigationProperty(toEnd.CorrespondingAssociationEndMember, out navigationProperty))
         {
             Type clrToType = EntityDataSourceUtil.GetMemberClrType(ocWorkspace, navigationProperty);
             EntityDataSourceReferenceValueColumn column = EntityDataSourceReferenceValueColumn.Create(clrToType, ocWorkspace, navigationProperty);
             columns.Add(column);
         }
     }
 }