21 lines
631 B
C#
21 lines
631 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using FluentNHibernate.Conventions;
|
|||
|
using FluentNHibernate.Conventions.Instances;
|
|||
|
|
|||
|
namespace Tanshu.Accounts.SqlDAO
|
|||
|
{
|
|||
|
public class ClassConvention : IClassConvention
|
|||
|
{
|
|||
|
public void Apply(IClassInstance instance)
|
|||
|
{
|
|||
|
string table = Inflector.Pluralize(instance.EntityType.Name);
|
|||
|
table = instance.EntityType.Namespace.Substring(instance.EntityType.Namespace.LastIndexOf('.') + 1) + "_" + table;
|
|||
|
instance.Table(table);
|
|||
|
//instance.Cache.NonStrictReadWrite();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|