public IActionResult Delete(int Id)
        {
            var delete = _buyerRepository.Delete(Id);

            if (delete > 0)
            {
                return(Ok(delete));
            }
            return(BadRequest("Can't be deleted"));
        }
Ejemplo n.º 2
0
 public ActionResult BuyerDelete(string id)
 {
     _buyerRepository.Delete(id);
     _buyerRepository.SaveChanges();
     return(RedirectToAction("UserList"));
 }