コード例 #1
0
        protected virtual string GetDefaultName()
        {
            var entityType = new RelationalEntityTypeAnnotations(Index.DeclaringEntityType, Annotations.ProviderPrefix);

            return("IX_" +
                   entityType.TableName +
                   "_" +
                   string.Join("_", Index.Properties.Select(p => p.Name)));
        }
コード例 #2
0
        protected virtual string GetDefaultName()
        {
            var entityType          = new RelationalEntityTypeAnnotations(ForeignKey.DeclaringEntityType, Annotations.ProviderPrefix);
            var principalEntityType = new RelationalEntityTypeAnnotations(
                ForeignKey.PrincipalEntityType,
                Annotations.ProviderPrefix);

            return(GetDefaultForeignKeyName(entityType.TableName,
                                            principalEntityType.TableName, ForeignKey.Properties.Select(p => p.Name)));
        }
コード例 #3
0
        protected virtual string GetDefaultName()
        {
            var entityType = new RelationalEntityTypeAnnotations(Key.DeclaringEntityType, Annotations.ProviderPrefix);

            return(GetDefaultKeyName(entityType.TableName, Key.IsPrimaryKey(), Key.Properties.Select(p => p.Name)));
        }