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;
            }
        }
Пример #2
0
        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;
            }
        }