Ejemplo n.º 1
0
 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
     };
 }
Ejemplo n.º 2
0
 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
     });
 }
Ejemplo n.º 3
0
        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;
        }