public IActionResult Delete(int Id) { var delete = _buyerRepository.Delete(Id); if (delete > 0) { return(Ok(delete)); } return(BadRequest("Can't be deleted")); }
public ActionResult BuyerDelete(string id) { _buyerRepository.Delete(id); _buyerRepository.SaveChanges(); return(RedirectToAction("UserList")); }