public static bool Eliminar(Entidades.PermisosDetalles id) { using (var db = new UserDb()) { try { db.Entry(id).State = System.Data.Entity.EntityState.Deleted; db.SaveChanges(); return(true); } catch (Exception) { throw; } } }
public static bool Guardar(Entidades.PermisosDetalles n) { bool retono = false; using (var db = new UserDb()) { try { db.PermisosDetallesDb.Add(n); db.SaveChanges(); retono = true; } catch (Exception) { throw; } return(retono); } }