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); }
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); }
public static IEntitySetBuilder WithUncontainedNavigationPropertySelfTarget( this IEntitySetBuilder entitySetBuilder, IUncontainedNavigationPropertyBuilder navigationProperty) { return(entitySetBuilder.WithUncontainedNavigationPropertyTarget(navigationProperty, entitySetBuilder)); }
public bool TryGetEntitySetBuilder(string name, out IEntitySetBuilder entitySetBuilder) => this.underlyingModelBuilder.TryGetEntitySetBuilder(name, out entitySetBuilder);
public bool TryGetEntitySetBuilder(string name, out IEntitySetBuilder entitySetBuilder) { return(this.entitySetBuilders.TryGetValue(name, out entitySetBuilder)); }