2013-05-14 66 views

回答

2

明白了:

public class SchemaConvention : IClassConvention 
{ 
    public void Apply(IClassInstance instance) 
    { 
     instance.Schema("schemaName"); 
    } 
} 


AutoPersistenceModel model = AutoMap.AssemblyOf<Whatever>(); 
model.Conventions.AddFromAssemblyOf<SchemaConvention>();