protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection,
            IManyToManyCollectionInspector otherSide)
        {

            return Inflector.Net.Inflector.Pluralize(collection.EntityType.Name) + "_" +
                Inflector.Net.Inflector.Pluralize(otherSide.EntityType.Name);
        }
        /// <summary>
        /// Gets the name of a unidirectional table.
        /// </summary>
        /// <param name="collection">An <see cref = "IManyToManyCollectionInspector" />.</param>
        /// <returns>A string containing the name of the unidirectional table.</returns>
        protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
        {
            if (collection == null)
            {
                throw new ArgumentNullException("collection");
            }

            return collection.EntityType.Name.Pluralize() + collection.ChildType.Name.Pluralize() + "Link";
        }
        /// <summary>
        /// Gets the name of a bidirectional table.
        /// </summary>
        /// <param name="collection">The parent <see cref = "IManyToManyCollectionInspector" />.</param>
        /// <param name="otherSide">The child <see cref = "IManyToManyCollectionInspector" />.</param>
        /// <returns>A string containing the name of the bidirectional table.</returns>
        protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide)
        {
            if (collection == null)
            {
                throw new ArgumentNullException("collection");
            }

            if (otherSide == null)
            {
                throw new ArgumentNullException("otherSide");
            }

            return collection.EntityType.Name.Pluralize() + otherSide.EntityType.Name.Pluralize() + "Link";
        }
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return collection.EntityType.Name + "_" + collection.ChildType.Name;
 }
 /// <summary>
 /// Gets the name used for bi-directional many-to-many tables. Implement this member to control how
 /// your join table is named for bi-directional relationships.
 /// </summary>
 /// <remarks>
 /// This method will be called once per bi-directional relationship; once one side of the relationship
 /// has been saved, then the other side will assume that name aswell.
 /// </remarks>
 /// <param name="collection">Main collection</param>
 /// <param name="otherSide">Inverse collection</param>
 /// <returns>Many-to-many table name</returns>
 protected abstract string GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide);
Exemple #6
0
 /// <summary>
 /// Gets the name used for bi-directional many-to-many tables. Implement this member to control how
 /// your join table is named for bi-directional relationships.
 /// </summary>
 /// <remarks>
 /// This method will be called once per bi-directional relationship; once one side of the relationship
 /// has been saved, then the other side will assume that name aswell.
 /// </remarks>
 /// <param name="collection">Main collection</param>
 /// <param name="otherSide">Inverse collection</param>
 /// <returns>Many-to-many table name</returns>
 protected abstract string GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide);
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection,
                                                     IManyToManyCollectionInspector otherSide)
 {
     return(Inflector.Net.Inflector.Pluralize(collection.EntityType.Name) + "_" +
            Inflector.Net.Inflector.Pluralize(otherSide.EntityType.Name));
 }
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection,
     IManyToManyCollectionInspector otherSide)
 {
     return GetTableName(collection.EntityType, otherSide.EntityType);
 }
 protected override String GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     throw new NotImplementedException();
 }
Exemple #10
0
 protected override string GetBiDirectionalTableName(
     IManyToManyCollectionInspector collection,
     IManyToManyCollectionInspector otherSide)
 {
     return Inflector.Underscore(collection.EntityType.Name + "_" + otherSide.EntityType.Name).ToUpper();
 }
Exemple #11
0
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return((collection.EntityType.Name.InflectTo().Pluralized) + "_" +
            (collection.ChildType.Name.InflectTo().Pluralized));
 }
Exemple #12
0
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection,
                                                     IManyToManyCollectionInspector otherSide)
 {
     return((collection.EntityType.Name.InflectTo().Pluralized) + "_" +
            (otherSide.EntityType.Name.InflectTo().Pluralized));
 }
        protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide)
        {
            var result = collection.EntityType.Name + "_" + otherSide.EntityType.Name;

            return(result);
        }
        protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
        {
            var result = collection.EntityType.Name + "_" + collection.ChildType.Name;

            return(result);
        }
Exemple #15
0
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return(ManyToMany(collection.EntityType, collection.ChildType));
 }
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide)
 {
     return otherSide.Member.Name + "_" + collection.Member.Name;
 }
 /// <inheritdoc />
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return($"{collection.ChildType.Name}_{collection.OtherSide.ChildType.Name}");
 }
 protected override String GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide)
 {
     return otherSide.EntityType.Name + Delimiter + collection.EntityType.Name;
 }
Exemple #19
0
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return Inflector.Underscore(collection.EntityType.Name + "_" + collection.ChildType.Name).ToUpper();
 }
 protected override String GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return collection.EntityType.Name + Delimiter + "Related";
 }
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return GetTableName(collection.EntityType, collection.ChildType);
 }
Exemple #22
0
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return(collection.EntityType.Name + "_" + collection.ChildType.Name + "UniMapping");
 }
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return(Inflector.Net.Inflector.Pluralize(collection.EntityType.Name) + "_" +
            Inflector.Net.Inflector.Pluralize(collection.ChildType.Name));
 }
Exemple #24
0
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection,
                                                     IManyToManyCollectionInspector otherSide)
 {
     return(collection.EntityType.Name + "_" + otherSide.EntityType.Name + "BiMapping");
 }
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return Inflector.Net.Inflector.Pluralize(collection.EntityType.Name) + "_" +
         Inflector.Net.Inflector.Pluralize(collection.ChildType.Name);
 }
Exemple #26
0
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return(Inflector.Underscore(collection.EntityType.Name + "_" + collection.ChildType.Name).ToUpper());
 }
Exemple #27
0
 /// <summary>
 /// Gets the name used for uni-directional many-to-many tables. Implement this member to control how
 /// your join table is named for uni-directional relationships.
 /// </summary>
 /// <param name="collection">Main collection</param>
 /// <returns>Many-to-many table name</returns>
 protected abstract string GetUniDirectionalTableName(IManyToManyCollectionInspector collection);
Exemple #28
0
 protected override string GetBiDirectionalTableName(
     IManyToManyCollectionInspector collection,
     IManyToManyCollectionInspector otherSide)
 {
     return(Inflector.Underscore(collection.EntityType.Name + "_" + otherSide.EntityType.Name).ToUpper());
 }
 /// <summary>
 /// Gets the name used for uni-directional many-to-many tables. Implement this member to control how
 /// your join table is named for uni-directional relationships.
 /// </summary>
 /// <param name="collection">Main collection</param>
 /// <returns>Many-to-many table name</returns>
 protected abstract string GetUniDirectionalTableName(IManyToManyCollectionInspector collection);
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection,
     IManyToManyCollectionInspector otherSide)
 {
     return (collection.EntityType.Name.InflectTo().Pluralized) + "_" +
         (otherSide.EntityType.Name.InflectTo().Pluralized);
 }
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide)
 {
     return collection.EntityType.Name + "_" + otherSide.EntityType.Name;
 }
 protected override string GetUniDirectionalTableName(IManyToManyCollectionInspector collection)
 {
     return (collection.EntityType.Name.InflectTo().Pluralized) + "_" +
         (collection.ChildType.Name.InflectTo().Pluralized);
 }
Exemple #33
0
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide)
 {
     return(ManyToMany(collection.EntityType, otherSide.EntityType));
 }
 protected override string GetBiDirectionalTableName(IManyToManyCollectionInspector collection, IManyToManyCollectionInspector otherSide)
 {
     return(otherSide.Member.Name + "_" + collection.Member.Name);
 }