Esempio n. 1
0
        public async Task <ActionResult <AuthorViewModel> > GetAuthorAsync(int id)
        {
            var author = await authorManager.GetAuthorAsync(id);

            if (author == null)
            {
                return(NotFound($"Couldn’t found Author of id {id}"));
            }
            var authorView = Mapper.Mapper.MapAuthor(author);

            return(authorView);
        }