-2
I need to check if there is already a registered document number not to repeat it. However, the field Document allows null, so there is an error when comparing a database value with a null value of my form. What to do so that the check returns no error if such form field contains null value?
Here I return all records from the database
var pontoAtendimentoRecuperados = RecuperarTodos(identidadeAtual);
Here I compare if any of the data brought from the database is equal to the content of the form field
var verificaDocumentoExistente = pontoAtendimentoRecuperados.Where(p => pontoAtendimento.Documento.Equals(p.Documento) && pontoAtendimento.Id != p.Id);
Error occurs in second line of code.
What error is occurring?
– CypherPotato
@Cypherpotato includes the image that represented the error.
– Victor Moraes