Done.
The problem was that the operation of updating or deleting rows must be
l between using statement so if you get the row with getfirst config your modifying that have no effect.
so the code is this
Public Shared Function delete_config(ByVal configurazione As CanoniConfig) As Boolean
Dim result As Boolean = False
Dim configurazione_to_delete As ConfigurazioniCanoniFissi = Nothing
Try
Using dbContext As New P2000ProdwareEntities
configurazione_to_delete = (From e In dbContext.ConfigurazioniCanoniFissis
Where e.ChFase = configurazione.chfase And e.ChTecnica = configurazione.chtecnica And e.Commessa = configurazione.commessa And e.ChCliente = configurazione.chcliente
Select e).First
If Not configurazione_to_delete Is Nothing Then
dbContext.DeleteObject(configurazione_to_delete)
dbContext.SaveChanges()
End If
result = True
End Using
Catch ex As Exception
result = False
End Try
Return result
End Function