public IHttpActionResult AddCost(int id, Cost cost) { var result = books.AddCost(id, cost); if (result != null) { return(Ok(result)); } return(NotFound()); }
public ActionResult <Book> AddCost(int id, [FromForm] Cost cost) { Book result = books.AddCost(id, cost); if (result != null) { return(result); } return(NotFound()); }
public IHttpActionResult AddCost(int id, Cost cost) { Book book = _bookRepository.AddCost(id, cost); if (book != null) { return(Ok(book)); } return(NotFound()); }