-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Enhima - is a set of conventions built upon NHibernate MappingByCode API. Not very extensible, but simple. You can map whole domain with a single line of code:
var cofing = new Configuration();
config.MapEntities(From.ThisApplication());
That's all.
To make things done Enhima takes in account the only assumption: every entity derives from Enhima.Entity. But wait... There is another entity called AggregateRoot. Enhima uses it to enforce cascade actions accordingly to ideas of Eric Evans.
Enhima consumes all MappingByCode classes like a ClassMapping, and overrides predefined convetions. So it possible to do everything that MappingByCode can handle. You shouldn't add them manually, they'll be taken automatically.
I'm too, and I like fast tests. So I add a couple of extension methods to quickly configure NHibernate with Sqlite.
config.ConfigureSqlite();
config.ConfigureSqliteInMemory();
Hope Enhima helps you to get rid of tedious mapping code!