public async Task <IActionResult> Delete(int id) { var deleteReader = await _reader.Delete(id); if (deleteReader) { return(RedirectToAction("Index")); } return(View()); }
public async Task <IActionResult> Delete(int id) { var deleteReader = await _reader.Delete(id); if (deleteReader) { return(Ok("Reader Deleted")); } else { return(BadRequest(new { message = "Unable to delete Reader details" })); } }