Exemplo n.º 1
0
 public Course Map(CourseEditModel course)
 {
     return new Course()
     {
         Id = course.Id,
         Name = course.Name,
         LanguageId = course.LanguageId,
         OwnerId = course.OwnerId
     };
 }
Exemplo n.º 2
0
 public Course Map(CourseEditModel course)
 {
     return(new Course()
     {
         Id = course.Id,
         Name = course.Name,
         LanguageId = course.LanguageId,
         OwnerId = course.OwnerId
     });
 }
Exemplo n.º 3
0
 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);
 }