public void Alterar(Entidade obj) { try { db.Entry(obj).State = Microsoft.EntityFrameworkCore.EntityState.Modified; db.SaveChanges(); } catch (SqlException ex) { throw ex; } }