public IActionResult Details(int id)
        {
            var Course = _courseData.GetCourseById(id);
            var model  = new CourseDetailsModel();

            model.Course    = _courseData.GetCourseById(id);
            model.AutorName = _autorData.GetAutorById(model.Course.idAutor).Name;

            if (model == null)
            {
                return(RedirectToAction(nameof(Index)));
            }

            return(View(model));
        }
        public void PrintById(int id)
        {
            var course = courseDatabase.GetCourseById(id);

            System.Console.WriteLine(course);
        }
Example #3
0
        public void PrintById(int id)
        {
            var course = data.GetCourseById(id);

            // print course
        }
Example #4
0
        public void PrintById(ICourseData data, int id)
        {
            var courses = data.GetCourseById(id);

            // print courses
        }
        public void PrintById(ICourseData data, int id)
        {
            var courses = data.GetCourseById(id);

            // print courses
        }