Ejemplo n.º 1
0
 public IActionResult Delete([FromBody] int id)
 {
     if (ModelState.IsValid)
     {
         var model = _service.FindById(s => s.Id == id);
         model.Id = id;
         var _list = _service.Delete(model);
         return(Ok(_list));
     }
     return(BadRequest(ModelState.ErrorCount));
 }
Ejemplo n.º 2
0
        public ActionResult Delete(int id)
        {
            var data = _iProductCategoryManager.Delete(id);

            return(Json(new { messageType = data.MessageType, message = data.ReturnMessage, html = GlobalClass.RenderRazorViewToString(this, "ViewAll", _iProductCategoryManager.GetAllProductCategory()) }, JsonRequestBehavior.AllowGet));
        }