Ejemplo n.º 1
0
        public ActionResult Post([FromBody] Book book)
        {
            var insertedBook = _bookLogic.CreateBook(book);

            if (insertedBook == null)
            {
                throw new Exception("Error in create new Book");
            }
            return(StatusCode(StatusCodes.Status201Created, insertedBook));
        }