Mic Got

Mic Got

  • 1.3k
  • 100
  • 7.8k

how to check duplicate record in entity framework core

Jun 16 2023 7:49 PM

Hi,

I have this code that return a value if a record exist or not , but one of the parameters is in error:

"destinationrecord is not null here" , this parameters is "destinationRecord.IdMovpartite"

 var dbValue = _dbContext.GetEstrazioneVenditeByIdAziIdDocIdRig(destinationRecord.IdAzienda, destinationRecord.IdDocumento, destinationRecord.IdRiga, destinationRecord.IdMovpartite);

Is there a way to make this check with a parameters that could be null or not?

The goal is,how can i retrieve dbValue with the 4 keys where 1 of this coul be null?

Thanks in advance!

 


Answers (5)