protected override string GetKeyName(Member member, Type type)
        {
            string name = NameConventions.ReplaceCamelCaseWithUnderscore(member == null ? type.Name : member.Name);

            return(string.Format("{0}_ID", name.ToUpper()));
        }
        private static string GetConstraintName(string child, string parent)
        {
            var constraintName = string.Format("FK_{0}_{1}", NameConventions.ReplaceCamelCaseWithUnderscore(child).ToUpper(), NameConventions.ReplaceCamelCaseWithUnderscore(parent).ToUpper());

            return(constraintName);
        }
예제 #3
0
        public void Apply(IPropertyInstance instance)
        {
            var name = NameConventions.ReplaceCamelCaseWithUnderscore(instance.Name);

            instance.Column(name.ToUpper());
        }
 private static string GetManyToManyConstraintName(string tableName, string entityName)
 {
     return(string.Format("FK_{0}_{1}", NameConventions.ReplaceCamelCaseWithUnderscore(tableName), NameConventions.ReplaceCamelCaseWithUnderscore(entityName)).ToUpper());
 }