-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
I have an issue and don't know how to solve it. Having 4 string fields from one entity I decided to change one of them "SerialNumber" to a value object.
At some point having an IQueryable I need to filter for the items that contain a similar search term, in this example details. There is no problem with using .Contains for any string fields but when I change SerialNumber to ValueObject and I don't have the Contain method anymore.
return query.Where(x =>
x.Number.Contains(details) ||
x.SerialNumber.Value.Contains(details) || //New field as string ValueObject
x.Name.Contains(details) ||
x.CarrierName.Contains(details));I tried to use x.SerialNumber.Value.Contains(details), details.Contains(x.SerialNumber.Value) and some other approaches. And responding with the following error: Could not be translated
Metadata
Metadata
Assignees
Labels
No labels