i have an trouble with lambda expression i have some releated tables and i need to select some results with count and avarage functions here ise the example class
class Course{
public long id;
public string name;
public virtual ICollection<Chapter> chapters;
}
class Chapter{
public long id;
public virtual ICollection<Videos> videos;
public virtual ICollection<Files> files;
}
i need to select them into
select new{
videoCount = [number of video releated to course],
fileCount = [number of file releated to course],
}
how can i select with lambda expression like
var result = from c in Courses...
i cant figured out here
select new{
videoCount = [number of video releated to course],
fileCount = [number of file releated to course],
};
thanks for your help.
Blockquote