public IActionResult Create([FromBody] CourseDto courseDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var newCourse = _courseLogic.Create(courseDto);

            return(CreatedAtAction(nameof(GetById), new { courseEntityId = newCourse.EntityId }, courseDto));
        }
        public async Task <IActionResult> Create([FromBody] CourseDto courseDto)
        {
            if (ModelState.IsValid)
            {
                LogicResponse response = new LogicResponse();

                response = _courseLogic.Create(courseDto);

                if (response.Success)
                {
                    courseDto.Id = Convert.ToInt32(response.Message);
                    return(Created($"/Courses/{response.Message}", courseDto));
                }
                else
                {
                    return(BadRequest(response.Message));
                }
            }

            return(BadRequest(ModelState.Values.FirstOrDefault().Errors.FirstOrDefault().ErrorMessage));
        }