示例#1
0
        public IEntitySetBuilder WithUncontainedNavigationPropertyTarget(
            IUncontainedNavigationPropertyBuilder navigationProperty,
            IEntitySetBuilder targetBuilder)
        {
            this.ThrowIfAlreadyBuilt();
            // TODO: recursive check necessary
            //if (!this.ContainedEntityType.NavigationPropertyBuilders.Contains(navigationProperty))
            //{
            //	throw new ArgumentException("The specified navigation property is not part of this set's entity type.", nameof(navigationProperty));
            //}

            this.uncontainedNavigationPropertyTargets[navigationProperty] = targetBuilder;
            return(this);
        }
示例#2
0
        private bool TryGetDataTreeTargetEntitySet(
            INavigationPropertyBuilder navigationProperty,
            IModelBuilder modelBuilder,
            out IEntitySetBuilder targetSet)
        {
            ISignature treeSignature;
            var        costSharpNavigationProperty = navigationProperty as ICostSharpNavigationPropertyBuilder;

            if (costSharpNavigationProperty != null && costSharpNavigationProperty.SourceProperty.TryGetTreeSignature(out treeSignature))
            {
                return(modelBuilder.TryGetEntitySetBuilder(this.signatureSetInitializer.GetSetName(treeSignature), out targetSet));
            }

            targetSet = null;
            return(false);
        }
示例#3
0
 public static IEntitySetBuilder WithUncontainedNavigationPropertySelfTarget(
     this IEntitySetBuilder entitySetBuilder,
     IUncontainedNavigationPropertyBuilder navigationProperty)
 {
     return(entitySetBuilder.WithUncontainedNavigationPropertyTarget(navigationProperty, entitySetBuilder));
 }
示例#4
0
 public bool TryGetEntitySetBuilder(string name, out IEntitySetBuilder entitySetBuilder)
 => this.underlyingModelBuilder.TryGetEntitySetBuilder(name, out entitySetBuilder);
示例#5
0
 public bool TryGetEntitySetBuilder(string name, out IEntitySetBuilder entitySetBuilder)
 {
     return(this.entitySetBuilders.TryGetValue(name, out entitySetBuilder));
 }