public IHttpActionResult AddCost(int id, Cost cost)
        {
            var result = books.AddCost(id, cost);

            if (result != null)
            {
                return(Ok(result));
            }
            return(NotFound());
        }
Ejemplo n.º 2
0
        public ActionResult <Book> AddCost(int id, [FromForm] Cost cost)
        {
            Book result = books.AddCost(id, cost);

            if (result != null)
            {
                return(result);
            }
            return(NotFound());
        }
Ejemplo n.º 3
0
        public IHttpActionResult AddCost(int id, Cost cost)
        {
            Book book = _bookRepository.AddCost(id, cost);

            if (book != null)
            {
                return(Ok(book));
            }

            return(NotFound());
        }