I have no control over the db schema and need to map two database columns to a single property in my .Net class. The db engine is DB2
The database has columns AUTH_DT
of type DATE
and AUTH_TM
of type TIME
. The relevant code follows:
public class Authorisation{
...
public virtual DateTime TransactionDate { get; set; }
...
}
public class AuthorisationMap : ClassMap<Authorisation>{
...
Map(x => x.TransactionDate); //.Column("AUTH_DT" + "AUTH_TM");
...
}
How can I tell the class-map to combine the date and time columns from the db?