コード例 #1
0
        public void Add(AuthorVM.Author author)
        {
            var dto = new DtoAuthor
            {
                FirstName = author.FirstName,
                LastName  = author.LastName
            };

            svc.Add(dto);
        }
コード例 #2
0
        public void Update(AuthorVM.Author author)
        {
            var dto = new DtoAuthor
            {
                AuthorId  = author.AuthorID,
                FirstName = author.FirstName,
                LastName  = author.LastName
            };

            svc.Update(dto);
        }
コード例 #3
0
        public AuthorVM.Author Update(int id)
        {
            var dto = Find(id);

            var author = new AuthorVM.Author
            {
                AuthorID  = dto.AuthorID,
                FirstName = dto.FirstName,
                LastName  = dto.LastName
            };

            return(author);
        }