public IActionResult Post([FromBody] WordsDTO words)
        {
            if (words != null && words.Words != null && words.Words.Any())
            {
                _repository.Add(words.Words);
            }

            return(Created("", null));
        }
Beispiel #2
0
 public WordsVM(WordsDTO row)
 {
     HebrewWord    = row.HebrewWord;
     Cuniform      = row.Cuniform;
     CuniformImage = row.CuniformImage;
     Phonetic      = row.Phonetic;
     Meaning       = row.Meaning;
     RelatedWords  = row.RelatedWords;
 }
        public IActionResult Post([FromBody] WordsDTO words)
        {
            var areAnagrams = false;

            if (words != null && words.Words != null && words.Words.Any())
            {
                areAnagrams = _repository.AreAnagrams(words.Words);
            }

            return(Ok(new { anagrams = areAnagrams }));
        }