//GET: Score public ActionResult Index() { if (TempData["message"] != null) { ViewBag.Success = (string)TempData["message"]; } var results = _scoreMgr.GetScores(); if (results.Succeeded == true) { List <Score> mylist = new List <Score>(); foreach (var item in results.Unwrap()) { item.TotalScore = item.Quality + item.Quantity + item.Taste + item.CustomerServices + item.TimeLiness; } return(View(results.Unwrap())); } else { ModelState.AddModelError(string.Empty, "An error occure"); return(View()); } }