示例#1
0
        private void Write(ConcreteNavigationCollectionProperty property)
        {
            WriteDeclaration(property);

            using (_builder.IndentBraced)
            {
                _("get");

                using (_builder.IndentBraced)
                {
                    _("return new {0}<{1}, {2}>(Context, ({3}<{2}>) {4});",
                      NamesService.GetExtensionTypeName("PagedCollection"),
                      NamesService.GetConcreteInterfaceName(property.OdcmType),
                      NamesService.GetConcreteTypeName(property.OdcmType),
                      NamesService.GetExtensionTypeName("EntityCollectionImpl"),
                      property.FieldName);
                }
            }
        }
示例#2
0
 public static NavigationProperty AsConcreteNavigationProperty(OdcmProperty odcmProperty)
 {
     return(odcmProperty.IsCollection()
         ? ConcreteNavigationCollectionProperty.ForConcrete(odcmProperty)
         : ConcreteNavigationProperty.ForConcrete(odcmProperty));
 }