Ejemplo n.º 1
0
        /// <summary>
        /// Creates the name of the association.
        /// </summary>
        /// <param name="dbManyName">Name of the db many.</param>
        /// <param name="dbManySchema">The db many schema.</param>
        /// <param name="dbOneName">Name of the db one.</param>
        /// <param name="dbOneSchema">The db one schema.</param>
        /// <param name="dbConstraintName">Name of the db constraint.</param>
        /// <param name="foreignKeyName">Name of the foreign key.</param>
        /// <param name="nameFormat">The name format.</param>
        /// <returns></returns>
        protected virtual AssociationName CreateAssociationName(string dbManyName, string dbManySchema,
                                                                string dbOneName, string dbOneSchema, string dbConstraintName, string foreignKeyName, NameFormat nameFormat)
        {
            var associationName = NameFormatter.GetAssociationName(dbManyName, dbOneName,
                                                                   dbConstraintName, foreignKeyName, GetExtraction(dbManyName), nameFormat);

            associationName.DbName = GetFullDbName(dbManyName, dbManySchema);
            return(associationName);
        }