You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
solyutor edited this page Jan 28, 2012
·
3 revisions
Enhima
The beginning
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.
A bit deeper
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.
What if conventions don't suit a case?
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.
What if I'd like to test?
I'm too, and I like fast tests. So I add a couple of extension methods to quickly configure NHibernate with Sqlite.