in my .net core service I have a list as follows:
List<string> list = new(){
110234,
231798,
445978
}
The database table has the following columns: int1(2)
, int(3)
, int3(1)
.
Now I want to query all records where the concat string maches. But with following example I get a LINQ/Ef-Core exception that this expression can't be translated:
myentities = myentities
.Where(e => list.Contains($"{e.int1.ToString("00")}{e.int2.ToString("000")}{e.int3.ToString("0")}"))
.ToList();
Does anyone has an idea how I can handle that?