I'm trying to get started with mapping by code in NH 3.2 and I more then a little lost.
I need pointers back to basic documentation so I can understand what the examples I can find mean, for example...
public class CustomerMap : ClassMapping<Customer>
{
public CustomerMap()
{
Lazy(false);
Id(x => x.ID, map => map.Generator(Generators.HighLow,
gmap => gmap.Params(new {max_low = 100})));
Property(x => x.FirstName, map => map.NotNullable(true));
Property(x => x.LastName, map => map.NotNullable(true));
Property(x => x.Email, map =>
{
map.Unique(true);
map.Length(50);
map.NotNullable(true);
});
}
Now, where is the documentation that can tell me what the heck is happening here. There's an Id method in ClassMapping, but I how no idea what possible parameters it can take or what the map.Generator class is doing. Further more, what is the x=> x.ID doing? From what I understand it should say that the reference to x goes to x.id, but x is used all over the plcae!?! Documentation on the Property function ( heack the entire ClassMapping class) would help alot.
I'm lost.