コード例 #1
0
 public Author Update(Author author)
 {
     var authorDetails = _authorRepository.Get(author.Id);
     authorDetails.Name = author.Name;
     _authorRepository.CommitChanges();
     return authorDetails;
 }
コード例 #2
0
        public Author Insert(Author author)
        {
            var authorDetails = new Author();
            authorDetails.Name = author.Name;

            authorDetails = _authorRepository.InsertOnCommit(authorDetails);
            _authorRepository.CommitChanges();
            return authorDetails;
        }