Example #1
0
        public async Task <IActionResult> Delete(int id)
        {
            var deleteReader = await _reader.Delete(id);

            if (deleteReader)
            {
                return(RedirectToAction("Index"));
            }
            return(View());
        }
Example #2
0
        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" }));
            }
        }