Пример #1
0
        public void SaveAuthor(Author author)
        {
            var existingAuthor = _manager.AuthorRepository.GetByID(author.AuthorId);

            if (existingAuthor == null)
            {
                _manager.AuthorRepository.Insert(author);
                _manager.save();
            }
            else
            {
                _manager.AuthorRepository.Update(author);
            }
        }
Пример #2
0
 public void UpdateAuthor(Author authorToUpdate)
 {
     authorService.SaveAuthor(authorToUpdate);
 }