Ejemplo n.º 1
0
        public ActionResult CreateBook(BookModel bookModel)
        {
            int id = this.materialService.CreateBookMaterial(new BookMaterial {
                Name   = bookModel.Name,
                Format = bookModel.Format,
                Page   = bookModel.Page,
                Issued = bookModel.Issued
            });
            int courseId = Int32.Parse(HttpContext.Request.Cookies["courseId"].Value);

            courseService.AddMaterialToCourse(courseId, id);
            return(RedirectToAction("Course", "Course", courseId.ToString()));

            return(View());
        }