public async Task <IActionResult> Detele(int id) { var result = await catRepository.DeleteAsync(id); if (result) { return(Ok($" Record with {id} is deleted successfully {result}")); } return(NotFound($" Record with {id} is not found so result of delete operation is {result}")); }
public async Task <IActionResult> Delete(int id) { var res = await prdRepository.DeleteAsync(id); return(RedirectToAction("Index")); }