C#
public ActionResult ifcondi(DirectItem di)
{
string getDirectId = HttpUtility.HtmlEncode(di.Id);
var data1 = (from c in db.RowItems
join a in db.categories on c.CategoryItemId equals a.category_id
join d in db.DirectItems on c.DirectItemId equals d.Id
// here plazma 60 is static ..i have many button plazma 60 ,, plazma 90 ,and so on
where d.ItemName == "plazma 60" //insted of static item wht i have to add to make dynamik query
select new { c, a, d }).GroupBy(x => x.a.category_name).Select(y => new tempdata
{
CatagoryName = y.Key,
lists = y.Select(p => new a
{
name = p.c.ItemName
}).ToList()
}).ToList();
return View(data1.ToList());
}
Sasindran Thavaselvam6 pointsPosted Oct 7, 2015, 6:10 AM EDT
1 short reply
jaydeep shah35 pointsPosted Oct 7, 2015, 10:33 PM EDT