Fluent Nhibernate Schema Generation
I have been playing about with FluentNhibernate as part of the S#arp Architecture. Below is an example mapping. public class EventBaseMap : ClassMap<EventBase> { public EventBaseMap() { WithTable("Event_Header"); //NotLazyLoaded(); Id(x => x.Id).WithUnsavedValue(-1).GeneratedBy.Native(); Map(x => x.Name).WithLengthOf(50).Not.Nullable(); Map(x => x.Description).WithLengthOf(255); Map(x => x.Rating); Map(x => x.Price); Map(x => x.PhoneNumber).WithLengthOf(20).Not.Nullable(); Map(x => x.EmailAddress); Map(x => x.Website); Map(x => x.State).Not.Nullable().CustomSqlTypeIs("INT"); Component(x => x