I'm trying to code my domain to interfaces types rather than concrete types.
Skeleton examples of two domain objects are:
public class Supplier : ISupplier
{
public virtual IContract Contract {get; set;}
}
public class Contract : IContract
{
public virtual List<ISuppliers> Suppliers {get; set;}
}
Is there a way to Fluently map my supplier so that it will cast to concrete domain objects for data access?
I currently get the error
NHibernate.MappingException: An association from the table Supplier refers to an unmapped class: IContract
With the following supplierMap
References(x => x.Contract).Column("ContractId")