Last post Jul 24, 2019 02:32 PM by cenk1536
Jul 24, 2019 02:17 PM|cenk1536|LINK
I wonder if there is a way to check GUID is null. ReferenceId is GUID.
var result= await _unitOfWork.GameBankRepository.GetGamesAsync(g =>
g.productCode == requestDto.productCode && g.referenceId == null);
Thank you in advance.
Jul 24, 2019 02:28 PM|PatriceSc|LINK
referenceId is a Guid or a Guid? (in C# the ? suffix is for nullable types)
If it is "empty" rather than null, try g.referenceId == Guid.Empty
(or if you have an error message tell what it is so that we don't have to guess first which problem you see).
Jul 24, 2019 02:32 PM|cenk1536|LINK
It is Guid. I will try Guid.Empty to check 00000000-0000-0000-0000-000000000000
Thank you PatriceSc.