public async Task <IActionResult> Create([FromBody] CoursePostViewModel course)
        {
            var courseForSave = _mapper.Map <CoursePostViewModel, Course>(course);


            courseForSave.Author = await _userManager.GetUserAsync(HttpContext.User);

            _courseData.AddCourse(courseForSave);

            var courseFromDb = _courseData.GetCourseByName(course.Name);

            var category = _courseData.GetCategories().FirstOrDefault(c => c.Name.ToLower() == course.Category.ToLower());

            if (category == null)
            {
                category = new Category
                {
                    Name = course.Category
                };
                _courseData.AddCategory(category);
            }
            _courseData.AddCategoryToCourse(category, courseFromDb);
            _courseData.UpdateCourse(courseFromDb);
            return(Json(new { result = "Redirect", url = Url.Action("UploadContent", "Course", new { id = courseFromDb.Id }) }));
        }