I am developing an application in which there is a model using race results / time, etc.
I have a model that looks something like this:
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 that are a βflatβ view of the data. It will look something like this:
vResult
ResultID
ResultTime
CompetitorID
CompetitorName
CompetitorDateOfBirth
Eventid
Eventname
Eventdescription
So, I try to avoid having a class that matches the above βflatβ schema completely (if possible)
Is this possible to match with Fluent nHibernate?
EDIT -
It should be noted that data access will be read-only
source share