How to I get the grouped data to show up on my view? It wants to recieve a IEnumerable of the model but I'm passing grouped data.
I'm returning this to the view in my controller:
var slb = (from s in db.Tbl_Slb
group s by s.Tbl_Docent.Docent_Code into d
select d)
This is the model
public partial class Tbl_Slb
{
public Tbl_Slb()
{
this.Tbl_Opmerking = new HashSet<Tbl_Opmerking>();
}
public System.DateTime Slb_Van { get; set; }
public Nullable<System.DateTime> Slb_Tot { get; set; }
public string Student_Nummer { get; set; }
public int Docent_Code { get; set; }
public int Slb_Code { get; set; }
public virtual Tbl_Docent Tbl_Docent { get; set; }
public virtual ICollection<Tbl_Opmerking> Tbl_Opmerking { get; set; }
public virtual Tbl_Student Tbl_Student { get; set; }
}