Esempio n. 1
0
        private void Write(ConcreteNavigationProperty property)
        {
            WriteDeclaration(property);

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

                using (_builder.IndentBraced)
                {
                    _("return this.{0};", property.FieldName);
                }

                _("set");

                using (_builder.IndentBraced)
                {
                    _("if (this.{0} != value)", property.Name);
                    using (_builder.IndentBraced)
                    {
                        _("this.{0} = ({1})value;", property.Name, property.FieldType);
                    }
                }
            }
        }
Esempio n. 2
0
        private void Write(ConcreteNavigationProperty property)
        {
            WriteDeclaration(property);

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

                using (_builder.IndentBraced)
                {
                    _("return this.{0};", property.FieldName);
                }

                _("set");

                using (_builder.IndentBraced)
                {
                    _("if (this.{0} != value)", property.Name);
                    using (_builder.IndentBraced)
                    {
                        _("this.{0} = ({1})value;", property.Name, property.FieldType);
                    }
                }
            }
        }
Esempio n. 3
0
 public static NavigationProperty AsConcreteNavigationProperty(OdcmProperty odcmProperty)
 {
     return(odcmProperty.IsCollection
         ? ConcreteNavigationCollectionProperty.ForConcrete(odcmProperty)
         : ConcreteNavigationProperty.ForConcrete(odcmProperty));
 }