public static String DeleteEntitat(ENTITATS entitat) { String mensaje = ""; GeneralORM.bd.ENTITATS.Remove(entitat); try { GeneralORM.bd.SaveChanges(); } catch (DbUpdateException ex) { SqlException sqlEx = (SqlException)ex.InnerException.InnerException; mensaje = GeneralORM.MissatgesError(sqlEx); } return(mensaje); }