예제 #1
0
        public void GetDescriptionForModal(String key)
        {
            var uow = new VocabularyUow(new VocabularyDbContext());
            IVocabularyService vocabularyService = new VocabularyService(uow);

            Word word = vocabularyService.GetByKey(key);
            Clients.PublishDescriptionForModal(word);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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("Ошибка");

            }
        }