Simple
public class TimeLine
{
public String Name {get;set}
public List<Milestone> MilesStones {get;set}
}
public class Milestone
{
public String Name {get;set}
public DateTime Time {get;set}
}
I tried:
from t in DataAccess.TimelineCollection.OrderBy(c=>c.MilesStones.OrderBy(z=>z.MilestoneDate)) select t; but got an error that “At least one object must implement IComparable.”
I need to order TimeLine by Milestone.Time. First project in a list will be the one that has eraliest Time property in Milestone collection.
Need help with link.
It sounds like you might want
In other words, for each
TimeLine, find the earliest milestone, and use that for ordering.Of course if the milestones are in order, you could use:
Both of these will fail if any
TimeLinehas no milestones.