I currently have a bookings model such as:
public class RoomBooking : Entity, IBooking
{
public virtual Client Client { get; set; }
public virtual Address Address { get; set; }
public virtual IList<BookingPeriod> BookingPeriods{get;set;}...
public class BookingPeriod : Entity
{
public virtual IEnumerable<IBooking> Bookings { get; set; }
public virtual DateTime StartTime { get; set; }
public virtual DateTime EndTime { get; set; }...
Bookings have a many to many relationship with BookingPeriods. There are three different types of bookings which can be made and each of them have an associated type.
What would be the best way to map this for NHibernate? I'm currently using S#arp which utilises Fluent NHibernate's AutoMapping functionality. This gives the error on the Bookings
property as it is trying to reference an unmapped class (IBooking
).