Here is the component for which I want to configure mapping
public class Range<T> : ValueObject
{
public virtual T Start {get; set;}
public virtual T Finish {get; set;}
}
In my domain I have many entities which have properties like Range < DateTime>, Range < int > ... for a particular class with property x we configure the component this way:
persistenceModel.FindMapping<Customer>()
.Component<Address> (
x => x.CustomerAddress,
m =>
{
m.Map(x => x.Street).WithLengthOf(100);
m.Map(x => x.PostalCode).WithLengthOf(6);
m.Map(x => x.Town).WithLengthOf(30);
m.Map(x => x.Country).WithLengthOf(50);
});
How looks the convention for whole domain as generic T ? Do I miss something. Is not possible with FluentNhibernate ?