narsil/Tanshu.Accounts.Repository/Fluent/ForeignKeyConvention.cs
unknown 59909a5ee7 Updated NH, Code Refactoring, made all DB transactions atomic.
Must use the Repositories with Using or else bad things will happen.
2011-06-30 01:57:07 +05:30

17 lines
411 B
C#

using System;
using FluentNHibernate.Conventions;
using FluentNHibernate;
namespace Tanshu.Accounts.Conventions
{
public class CustomForeignKeyConvention : ForeignKeyConvention
{
protected override string GetKeyName(Member property, Type type)
{
return property == null
? type.Name + "ID"
: property.Name + "ID";
}
}
}