public ActionResult Delete(int id)
 {
     try
     {
         // TODO: Add delete logic here
         Feature feat = featSrv.Get(f => f.FeatureId == id);
         featSrv.Delete(feat);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Ejemplo n.º 2
0
        public JsonResult Delete(Feature feature)
        {
            int result = featureService.Delete(feature.Id);

            _hubContext.Clients.All.SendAsync("dataChangeNotification", null);
            if (result != 0)
            {
                return(Json(new { messageType = "success", note = AppGlobal.DeleteSuccessMessage }));
            }
            else
            {
                return(Json(new { messageType = "error", note = AppGlobal.DeleteFailMessage }));
            }
        }