示例#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);
 }