예제 #1
0
        public async Task <ActionResult <AuthorMODEL> > GetAuthor(int id)
        {
            var resultProcess = await authorBLL.GetAsync(id);

            if (!resultProcess.IsApproved)
            {
                return(BadRequest(resultProcess.ShortMessage));
            }
            if ((AuthorMODEL)resultProcess.ObjectResult == null)
            {
                return(NotFound());
            }

            return((AuthorMODEL)resultProcess.ObjectResult);
        }