public WordProgress Map(WordProgressModel wordProgress) { if (wordProgress == null) { throw new ArgumentNullException("wordProgress"); } return new WordProgress() { WordSuiteId = wordProgress.WordSuiteId, WordTranslationId = wordProgress.WordTranslationId, Progress = 0, IsStudentWord = wordProgress.IsStudentWord }; }
public WordProgress Map(WordProgressModel wordProgress) { if (wordProgress == null) { throw new ArgumentNullException("wordProgress"); } return(new WordProgress() { WordSuiteId = wordProgress.WordSuiteId, WordTranslationId = wordProgress.WordTranslationId, Progress = 0, IsStudentWord = wordProgress.IsStudentWord }); }
public IHttpActionResult RemoveWordProgress(WordProgressModel wordProgress) { if (wordProgress == null) throw new ArgumentNullException("wordProgress", "WordProgress can't be null"); return wordProgressService.RemoveByStudent(wordProgressMapper.Map(wordProgress)) ? Ok() as IHttpActionResult : BadRequest() as IHttpActionResult; }