2
After a query in BD, my query returns some null values in some attributes and when passing the values to the model:
ViewModel.Participantes.Add(new RelParticipantesInscritosAtividadeVM {
RA = p.RA.Value, Nome = p.Nome, Modulo = p.Modulo.Value
});
I get this error message:
The null object must have a value
How do I get my model to receive null values or replace null with a default value?
Only change your query to return a default value if it is null.
– LP. Gonçalves
how to do this?
– Rafael Christófano