public Course Map(CourseEditModel course) { return new Course() { Id = course.Id, Name = course.Name, LanguageId = course.LanguageId, OwnerId = course.OwnerId }; }
public Course Map(CourseEditModel course) { return(new Course() { Id = course.Id, Name = course.Name, LanguageId = course.LanguageId, OwnerId = course.OwnerId }); }
public IHttpActionResult EditCourse(CourseEditModel courseModel) { if (courseModel != null) { var course = _courseMapper.Map(courseModel); var wordSuitesId = courseModel.WordSuites.Select(x => x.Id).ToList(); _courseService.EditCourse(course, wordSuitesId); return Ok(); } return BadRequest(MessagesContainer.IncorrectData); }