Beispiel #1
0
 public IActionResult Post([FromBody] BooksVO books)
 {
     if (books == null)
     {
         return(BadRequest());
     }
     return(Ok(_booksBusiness.Create(books)));
 }
 public IActionResult Post([FromBody] Books book)
 {
     if (book == null)
     {
         return(BadRequest());
     }
     return(Ok(_BookService.Create(book)));
 }
        public IActionResult Post([FromBody] Book book)
        {
            if (book == null)
            {
                return(NotFound());
            }

            return(Ok(_bookBusiness.Create(book)));
        }
Beispiel #4
0
 public IActionResult Post([FromBody] Books book)
 {
     if (book == null)
     {
         BadRequest();
     }
     return(new ObjectResult(_booksbusiness.Create(book)));
     //return Ok();
 }
Beispiel #5
0
 public IActionResult Post([FromBody] BooksVO books)
 {
     if (books != null)
     {
         return(Ok(_booksRepository.Create(books)));
     }
     else
     {
         return(BadRequest("Nullable object"));
     }
 }