public ActionResult BookReturn(String userId, String returnId) { try { int returnid = Convert.ToInt32(returnId); IUserBookRequestService userBookRequestService = new UserBookRequestService(); var status = userBookRequestService.DeleteBookRequestForUser(returnid); if (status) { return Content("Success"); } return Content("Failed"); } catch (Exception e) { Console.WriteLine("Error in BookRequestController , BookRet"); Console.Write(e.ToString()); return Content("Failed"); } }
public void TestDeleteBookRequestForUser() { IUserBookRequestService userBookRequestService = new UserBookRequestService(); Boolean status = userBookRequestService.DeleteBookRequestForUser(11); Assert.IsTrue(status); }