I am trying to filter users depending on the value of a specific claim.
I use ASP .Net Core 3 and RavenDB.
filteredData = data.Search(d => d.Email, model.search.value)
.Search(d => d.LastName, model.search.value)
.Search(d => d.FirstName, model.search.value)
.Search(d => d.Claims.FirstOrDefault(c => c.ClaimType == "Role"), model.search.value);
This does not work. Here is the error message :
System.InvalidOperationException: 'Cannot understand how to translate d.Claims.FirstOrDefault(c => (c.ClaimType == "Role"))'
Thank you for your help.