Ejemplo n.º 1
0
        /// <summary>
        /// Gets the foreign key field name to use for a property.
        /// </summary>
        private string GetKeyColumnName(IModelInspector inspector, PropertyPath member)
        {
            var otherSideProperty = member.OneToManyOtherSideProperty();
            if (inspector.IsOneToMany(member.LocalMember) && otherSideProperty != null)
            {
                return otherSideProperty.Name + _foreignKeyColumnSuffix;

            }

            return member.GetRootMemberType().Name + _foreignKeyColumnSuffix;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the object type names for a many to many relationship sorted alphabetically.
 /// </summary>
 private static IEnumerable<string> GetManyToManySidesNames(PropertyPath member)
 {
     yield return member.GetRootMemberType().Name;
     yield return member.GetCollectionElementType().Name;
 }