Last post Jul 24, 2019 02:32 PM by cenk1536
Member
526 Points
2726 Posts
Jul 24, 2019 02:17 PM|cenk1536|LINK
Hi,
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.
All-Star
48490 Points
18071 Posts
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
00000000-0000-0000-0000-000000000000
Thank you PatriceSc.
Member
526 Points
2726 Posts
Check GUID is null?
Jul 24, 2019 02:17 PM|cenk1536|LINK
Hi,
I wonder if there is a way to check GUID is null. ReferenceId is GUID.
Thank you in advance.
All-Star
48490 Points
18071 Posts
Re: Check GUID is null?
Jul 24, 2019 02:28 PM|PatriceSc|LINK
Hi,
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).
Member
526 Points
2726 Posts
Re: Check GUID is null?
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.