2011-01-30 07:14:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
using FluentNHibernate;
|
2011-01-31 20:33:22 +00:00
|
|
|
|
using FluentNHibernate.Automapping;
|
2011-01-30 07:14:05 +00:00
|
|
|
|
|
2011-01-31 20:33:22 +00:00
|
|
|
|
namespace Tanshu.Accounts.Repository
|
2011-01-30 07:14:05 +00:00
|
|
|
|
{
|
|
|
|
|
public class StoreConfiguration : DefaultAutomappingConfiguration
|
|
|
|
|
{
|
|
|
|
|
public override bool ShouldMap(Type type)
|
|
|
|
|
{
|
|
|
|
|
return type.Namespace.StartsWith("Tanshu.Accounts.Entities");
|
|
|
|
|
}
|
|
|
|
|
public override bool IsId(Member member)
|
|
|
|
|
{
|
|
|
|
|
string key = member.DeclaringType.Name + "ID";
|
|
|
|
|
return key == member.Name;
|
|
|
|
|
}
|
|
|
|
|
public override bool IsDiscriminated(Type type)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|