in MVC3 asp.net this is my controller statement:-
ViewBag.rawMaterialRequired = (from x in db.RawMaterial
join y in db.ProductFormulation on x.ID equals y.RawMaterialID
where y.ProductID == p select new { x.Description, y.Quantity });
this is my View Code related to it:-
@foreach(var album in ViewBag.rawMaterialRequired)
{
@album<br />
}
So output is:-
{ Description = Polymer 26500, Quantity = 10 }
{ Description = Polymer LD-M50, Quantity = 10 }
{ Description = Titanium R-104, Quantity = 20 }
but i need this type of answer:-

please suggest me what should i do for it?
Thank you in advance…
Create a RawMaterial class
and use it instead of anonymous object
and the view