private ForeignKeyAssociationMappingConfiguration(ForeignKeyAssociationMappingConfiguration source) { DebugCheck.NotNull(source); _keyColumnNames.AddRange(source._keyColumnNames); _tableName = source._tableName; }
private ForeignKeyAssociationMappingConfiguration(ForeignKeyAssociationMappingConfiguration source) { Contract.Requires(source != null); _keyColumnNames.AddRange(source._keyColumnNames); _tableName = source._tableName; }
private ForeignKeyAssociationMappingConfiguration(ForeignKeyAssociationMappingConfiguration source) { DebugCheck.NotNull(source); _keyColumnNames.AddRange(source._keyColumnNames); _tableName = source._tableName; }
private ForeignKeyAssociationMappingConfiguration( ForeignKeyAssociationMappingConfiguration source) { this._keyColumnNames.AddRange((IEnumerable <string>)source._keyColumnNames); this._tableName = source._tableName; foreach (KeyValuePair <Tuple <string, string>, object> annotation in (IEnumerable <KeyValuePair <Tuple <string, string>, object> >)source._annotations) { this._annotations.Add(annotation); } }
/// <summary> /// Configures the relationship to use foreign key property(s) that are not exposed in the object model. /// The column(s) and table can be customized by specifying a configuration action. /// If an empty configuration action is specified then column name(s) will be generated by convention. /// If foreign key properties are exposed in the object model then use the HasForeignKey method. /// Not all relationships support exposing foreign key properties in the object model. /// </summary> /// <param name="configurationAction"> Action that configures the foreign key column(s) and table. </param> /// <returns> A configuration object that can be used to further configure the relationship. </returns> public CascadableNavigationPropertyConfiguration Map( Action <ForeignKeyAssociationMappingConfiguration> configurationAction) { Check.NotNull <Action <ForeignKeyAssociationMappingConfiguration> >(configurationAction, nameof(configurationAction)); this.NavigationPropertyConfiguration.Constraint = IndependentConstraintConfiguration.Instance; ForeignKeyAssociationMappingConfiguration mappingConfiguration = new ForeignKeyAssociationMappingConfiguration(); configurationAction(mappingConfiguration); this.NavigationPropertyConfiguration.AssociationMappingConfiguration = (AssociationMappingConfiguration)mappingConfiguration; return((CascadableNavigationPropertyConfiguration)this); }
private ForeignKeyAssociationMappingConfiguration(ForeignKeyAssociationMappingConfiguration source) { DebugCheck.NotNull(source); _keyColumnNames.AddRange(source._keyColumnNames); _tableName = source._tableName; foreach (var annotation in source._annotations) { _annotations.Add(annotation); } }
private ForeignKeyAssociationMappingConfiguration(ForeignKeyAssociationMappingConfiguration source) { DebugCheck.NotNull(source); _keyColumnNames.AddRange(source._keyColumnNames); _tableName = source._tableName; foreach (var annotation in source._annotations) { _annotations.Add(annotation); } }
/// <summary> /// Configures the relationship to use foreign key property(s) that are not exposed in the object model. /// The column(s) and table can be customized by specifying a configuration action. /// If an empty configuration action is specified then column name(s) will be generated by convention. /// If foreign key properties are exposed in the object model then use the HasForeignKey method. /// Not all relationships support exposing foreign key properties in the object model. /// </summary> /// <param name="configurationAction"> Action that configures the foreign key column(s) and table. </param> /// <returns> A configuration object that can be used to further configure the relationship. </returns> public CascadableNavigationPropertyConfiguration Map( Action<ForeignKeyAssociationMappingConfiguration> configurationAction) { Check.NotNull(configurationAction, "configurationAction"); NavigationPropertyConfiguration.Constraint = IndependentConstraintConfiguration.Instance; var independentAssociationMappingConfiguration = new ForeignKeyAssociationMappingConfiguration(); configurationAction(independentAssociationMappingConfiguration); NavigationPropertyConfiguration.AssociationMappingConfiguration = independentAssociationMappingConfiguration; return this; }
/// <summary> /// Configures the relationship to use foreign key property(s) that are not exposed in the object model. /// The column(s) and table can be customized by specifying a configuration action. /// If an empty configuration action is specified then column name(s) will be generated by convention. /// If foreign key properties are exposed in the object model then use the HasForeignKey method. /// Not all relationships support exposing foreign key properties in the object model. /// </summary> /// <param name="configurationAction"> Action that configures the foreign key column(s) and table. </param> /// <returns> A configuration object that can be used to further configure the relationship. </returns> public CascadableNavigationPropertyConfiguration Map( Action <ForeignKeyAssociationMappingConfiguration> configurationAction) { Check.NotNull(configurationAction, "configurationAction"); NavigationPropertyConfiguration.Constraint = IndependentConstraintConfiguration.Instance; var independentAssociationMappingConfiguration = new ForeignKeyAssociationMappingConfiguration(); configurationAction(independentAssociationMappingConfiguration); NavigationPropertyConfiguration.AssociationMappingConfiguration = independentAssociationMappingConfiguration; return(this); }
/// <summary> /// Configures the relationship to use foreign key property(s) that are not exposed in the object model. /// The column(s) and table can be customized by specifying a configuration action. /// If an empty configuration action is specified then column name(s) will be generated by convention. /// If foreign key properties are exposed in the object model then use the HasForeignKey method. /// Not all relationships support exposing foreign key properties in the object model. /// </summary> /// <param name = "configurationAction">Action that configures the foreign key column(s) and table.</param> /// <returns> /// A configuration object that can be used to further configure the relationship. /// </returns> public CascadableNavigationPropertyConfiguration Map( Action<ForeignKeyAssociationMappingConfiguration> configurationAction) { //Contract.Requires(configurationAction != null); NavigationPropertyConfiguration.Constraint = IndependentConstraintConfiguration.Instance; var independentAssociationMappingConfiguration = new ForeignKeyAssociationMappingConfiguration(); configurationAction(independentAssociationMappingConfiguration); NavigationPropertyConfiguration.AssociationMappingConfiguration = independentAssociationMappingConfiguration; return this; }
public bool Equals(ForeignKeyAssociationMappingConfiguration other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other._tableName, _tableName) && other._keyColumnNames.SequenceEqual(_keyColumnNames) && other._annotations.OrderBy(a => a.Key).SequenceEqual(_annotations.OrderBy(a => a.Key))); }
public bool Equals(ForeignKeyAssociationMappingConfiguration other) { if (object.ReferenceEquals((object)null, (object)other)) { return(false); } if (object.ReferenceEquals((object)this, (object)other)) { return(true); } if (object.Equals((object)other._tableName, (object)this._tableName) && other._keyColumnNames.SequenceEqual <string>((IEnumerable <string>) this._keyColumnNames)) { return(other._annotations.OrderBy <KeyValuePair <Tuple <string, string>, object>, Tuple <string, string> >((Func <KeyValuePair <Tuple <string, string>, object>, Tuple <string, string> >)(a => a.Key)).SequenceEqual <KeyValuePair <Tuple <string, string>, object> >((IEnumerable <KeyValuePair <Tuple <string, string>, object> >) this._annotations.OrderBy <KeyValuePair <Tuple <string, string>, object>, Tuple <string, string> >((Func <KeyValuePair <Tuple <string, string>, object>, Tuple <string, string> >)(a => a.Key)))); } return(false); }
public bool Equals(ForeignKeyAssociationMappingConfiguration other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (!Equals(other._tableName, _tableName)) { return(false); } return(other._keyColumnNames.SequenceEqual(_keyColumnNames)); }
public bool Equals(ForeignKeyAssociationMappingConfiguration other) { if (ReferenceEquals(null, other)) { return false; } if (ReferenceEquals(this, other)) { return true; } return Equals(other._tableName, _tableName) && other._keyColumnNames.SequenceEqual(_keyColumnNames) && other._annotations.OrderBy(a => a.Key).SequenceEqual(_annotations.OrderBy(a => a.Key)); }
public bool Equals(ForeignKeyAssociationMappingConfiguration other) { if (ReferenceEquals(null, other)) { return false; } if (ReferenceEquals(this, other)) { return true; } if (!Equals(other._tableName, _tableName)) { return false; } return other._keyColumnNames.SequenceEqual(_keyColumnNames); }