internal void Configure(EntityType entityType) { DebugCheck.NotNull(entityType); entityType.AddAnnotation(XmlConstants.IndexAnnotationWithPrefix, new IndexAnnotation(new IndexAttribute(_name, _isClustered, _isUnique))); }
internal override void Configure( AssociationSetMapping associationSetMapping, EdmModel database, PropertyInfo navigationProperty) { EntityType table = associationSetMapping.Table; if (this._tableName != null) { table.SetTableName(this._tableName); table.SetConfiguration((object)this); } bool flag = navigationProperty.IsSameAs(associationSetMapping.SourceEndMapping.AssociationEnd.GetClrPropertyInfo()); ManyToManyAssociationMappingConfiguration.ConfigureColumnNames(flag ? (ICollection <string>) this._leftKeyColumnNames : (ICollection <string>) this._rightKeyColumnNames, (IList <ScalarPropertyMapping>)associationSetMapping.SourceEndMapping.PropertyMappings.ToList <ScalarPropertyMapping>()); ManyToManyAssociationMappingConfiguration.ConfigureColumnNames(flag ? (ICollection <string>) this._rightKeyColumnNames : (ICollection <string>) this._leftKeyColumnNames, (IList <ScalarPropertyMapping>)associationSetMapping.TargetEndMapping.PropertyMappings.ToList <ScalarPropertyMapping>()); foreach (KeyValuePair <string, object> annotation in (IEnumerable <KeyValuePair <string, object> >) this._annotations) { table.AddAnnotation("http://schemas.microsoft.com/ado/2013/11/edm/customannotation:" + annotation.Key, annotation.Value); } }