public void GetDescriptionForModal(String key) { var uow = new VocabularyUow(new VocabularyDbContext()); IVocabularyService vocabularyService = new VocabularyService(uow); Word word = vocabularyService.GetByKey(key); Clients.PublishDescriptionForModal(word); }
public void GetDescription(String key) { var uow = new VocabularyUow(new VocabularyDbContext()); IVocabularyService vocabularyService = new VocabularyService(uow); Word word = vocabularyService.GetByKey(key); Clients.PublishDescription(word.Key, word.Theme, word.Description); }
public void UpdateWord(Word word) { var uow = new VocabularyUow(new VocabularyDbContext()); IVocabularyService vocabularyService = new VocabularyService(uow); try { vocabularyService.UpdateWord(word); Clients.PublishUpdated("Успех!"); } catch(Exception) { Clients.PublishUpdated("Ошибка"); } }