// GET: start public ActionResult dashboard() { Mini t = new Mini(); int uid = int.Parse(Session["uid"].ToString()); int rid = int.Parse(Session["role"].ToString()); ViewBag.rid = rid; var rdata = from i in t.requests select i; List <request> reqs = new List <request>(); foreach (var i in rdata) { request req = new request(); req.reqid = i.reqid; req.skillname = i.skillname; req.sdate = i.sdate; req.edate = i.edate; req.status = i.status; req.trainerid = i.trainerid; req.execid = i.execid; reqs.Add(req); } return(View(reqs)); }