I'm developing an app that has a model using race results / times etc..
I've got a model that looks something like:
public class Competitor
{
public virtual int ID { get; set; }
public virtual string Name { get; set; }
public virtual DateTime DateOfBirth { get; set; }
}
public class Event
{
public virtual int ID { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
}
public class Result
{
public virtual int ID { get; set; }
public virtual decimal ResultTime { get; set; }
public virtual Competitor Competitor { get; set; }
public virtual Event Event { get; set; }
}
In my database, I only have access to Views which represent a "flat" view of the data. This would look something like:
vResult
ResultID
ResultTime
CompetitorID
CompetitorName
CompetitorDateOfBirth
EventID
EventName
EventDescription
So, I'm trying to avoid having a class that matches the above "flat" schema entirely (if possible)
Is it possibly to map this with Fluent nHibernate?
EDIT-
It's worth mentioning, data access will be read only