// GET: Tamu public ActionResult Index() { using (TamuDAL tamu = new TamuDAL()) { string username = Session["username"] != null ? Session["username"].ToString() : string.Empty; return(View(tamu.GetData().ToList())); } }
// GET: Tamu public ActionResult Index() { using (TamuDAL service = new TamuDAL()) { var model = service.GetData().ToList(); if (TempData["Pesan"] != null) { ViewBag.Pesan = TempData["Pesan"].ToString(); } return(View(model)); } }