Exemplo n.º 1
0
        public ActionResult Edit(Guid id)
        {
            var result = resultService.Find(id);

            if (result == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CourseId  = new SelectList(courseService.GetAll(), "Id", "CourseName", result.CourseId);
            ViewBag.StudentId = new SelectList(studentService.GetAll(), "Id", "StudentName", result.StudentId);

            return(View(result));
        }
        // GET: Results/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Result result = _resultService.Find(id);

            if (result == null)
            {
                return(HttpNotFound());
            }
            return(View(result));
        }