コード例 #1
0
 static Word UserWordWMToWord(UserWordJqViewModel userWordJqVM)
 {
     return(new Word()
     {
         Id = userWordJqVM.Word_Id,
         Text = userWordJqVM.WordText?.Trim().ToLower(),
         Language_Id = userWordJqVM.WordLanguage_Id,
         //Language = new Data.Polyglot.Language() { Id = this.Language_Id },
         Type_Id = userWordJqVM.WordType_Id,
         //WordType = new WordType() { Id = this.Type_Id.Value },
     });
 }
コード例 #2
0
ファイル: UserWordController.cs プロジェクト: qqga/cshh
        public string JqGridAdd(UserWordJqViewModel editWordVM)
        {
            try
            {
                UserWord map = _mapper.Map <UserWord>(editWordVM);

                _wordsService.Add(map);
            }
            catch (Exception ex)
            {
                return(this.BadRequestAndCollectEx(ex));
            }

            return(null);
        }