Exemplo n.º 1
0
 private void ChangeCurrentTerm(Term term)
 {
     if (term.IsCurrentTerm)
     {
         foreach (var termToUpdate in _termRepository.GetAll())
         {
             if (termToUpdate != term)
             {
                 termToUpdate.IsCurrentTerm = false;
                 _termRepository.Update(termToUpdate);
             }
         }
     }
 }
Exemplo n.º 2
0
        public async Task UpdateGlossaryTerm(UpdateGlossaryTermRequest request, int termId)
        {
            GlossaryTerm glossaryTermToUpdate = await _dataRepository.Get(termId);

            var glossaryTerm = new GlossaryTerm
            {
                Definition = request.Definition
            };

            await _dataRepository.Update(glossaryTermToUpdate, glossaryTerm);
        }