public ActionResult ReturnBook([FromBody] ReturnBook BookReturn)/// StudentID,Barcode { try { var IsReturned = _ManageLibraryServices.ReturnBook(BookReturn.StudentId, BookReturn.BookBarCode); if (IsReturned) { return(Ok("Book Returned Successfully")); } else { return(NotFound("Failed to Return book")); } } catch (Exception e) { return(BadRequest(e.Message)); } }
public void ReturnBook([FromBody] ReturnBook BookReturn)/// StudentID,Barcode { _ManageLibraryServices.ReturnBook(BookReturn.StudentId, BookReturn.BookBarCode); }