Beispiel #1
0
 public IActionResult Edit(long id, [FromBody] BaseAuthorVM author)
 {
     author.Id = id;
     authorService.EditAuthor(author);
     return(Ok());
 }
        public void EditAuthor(BaseAuthorVM author)
        {
            var authorEM = mapper.ConvertTo <AuthorEM>(author);

            authorRepository.EditAuthor(authorEM);
        }
Beispiel #3
0
        public IActionResult Create([FromBody] BaseAuthorVM author)
        {
            var id = authorService.CreateAuthor(author);

            return(Ok(new Identifier(id)));
        }
        public long CreateAuthor(BaseAuthorVM author)
        {
            var authorEM = mapper.ConvertTo <AuthorEM>(author);

            return(authorRepository.CreateAuthor(authorEM));
        }