public void Apply(IJoinedSubclassInstance instance) { string tableName = NameConventions.GetTableName(instance.EntityType); instance.Table(tableName); instance.BatchSize(25); }
public void Apply(IIdentityInstance instance) { string sequenceName = NameConventions.GetSequenceName(instance.EntityType); string columnName = NameConventions.GetPrimaryKeyColumnName(instance.EntityType); instance.Column(columnName); instance.GeneratedBy.Native(paramBuilder => paramBuilder.AddParam("sequence", sequenceName)); }
private static string GetTableName(Type entityType, Type otherSideType) { return(NameConventions.GetTableName(entityType) + "_" + NameConventions.GetTableName(otherSideType)); }
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())); }
public void Apply(IPropertyInstance instance) { var name = NameConventions.ReplaceCamelCaseWithUnderscore(instance.Name); instance.Column(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); }
private static string GetManyToManyConstraintName(string tableName, string entityName) { return(string.Format("FK_{0}_{1}", NameConventions.ReplaceCamelCaseWithUnderscore(tableName), NameConventions.ReplaceCamelCaseWithUnderscore(entityName)).ToUpper()); }