I'm trying to get a private backing field mapped in MongoDB.
My model looks like:
public class Competitor
{
private IList<CompetitorBest> _competitorBests;
public virtual int CompetitorId { get; set; }
public virtual string Name
{
get
{
if (Type == "Team")
return TeamName;
return FirstName + " " + LastName;
}
}
public virtual IEnumerable<CompetitorBest> CompetitorBests
{
get { return _competitorBests.ToArray(); }
}
}
I'm basically trying to map _competitorBests, to be CompetitorBests (which exists in my document in mongo)
Note: This model is shared by NHibernate (hence the virtual
)
I can't see anything obvious in the docs.
How do I do it?