public class Date
{
DateTime _dateTime;
public Date(int year, int month, int day)
{
_dateTime = new DateTime(year, month, day);
}
public int Year
{
get { return _dateTime.Year; }
}
public int Month
{
get { return _dateTime.Month; }
}
public int Day
{
get { return _dateTime.Day; }
}
/* snip */
}
public class Schedule : EntityBase
{
public Date StartDate { get; set; }
/* snip */
}
I'm trying to get this mapped to an SQL date type.
I've read the following:
http://jagregory.com/writings/fluent-nhibernate-auto-mapping-type-conventions/
http://intellect.dk/post/Implementing-custom-types-in-nHibernate.aspx
The problem I've run into thus far is that the example uses
ITypeConvention which according to
http://wiki.fluentnhibernate.org/Converting_to_new_style_conventions
is now IClassConvention. Can someone provide an example of using this
type to specify the custom type and column name?
Derek