public ActionResult EliminarFamilia(int id) { try { var familia = service.GetFamiliaById(id); if (familia.InverseIdFamiliaNavigation.Count() != 0) { return(Json(new { data = false })); } service.Delete(familia); return(Json(new { data = true })); } catch (Exception) { return(Json(new { data = false })); throw; } }
public ActionResult EliminarFamilia(int id) { try { var familia = service.GetFamiliaById(id); if (familia.InverseIdFamiliaNavigation.Count() != 0) { return(Json(new { data = false })); } service.Delete(familia); return(Json(new { data = true })); } catch (Exception ex) { AltivaLog.Log.Insertar(ex.ToString(), "Error"); return(Json(new { data = false })); throw; } }