예제 #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);
        }