Beispiel #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),
                      "DataServiceCollection",
                      property.Name);
                }
            }
        }
Beispiel #2
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),
                        "DataServiceCollection",
                        property.Name);
                }
            }
        }
Beispiel #3
0
 public static NavigationProperty AsConcreteNavigationProperty(OdcmProperty odcmProperty)
 {
     return(odcmProperty.IsCollection
         ? ConcreteNavigationCollectionProperty.ForConcrete(odcmProperty)
         : ConcreteNavigationProperty.ForConcrete(odcmProperty));
 }