I have a simple Raven dB table which is as follows:
char[] colorArray= colorValue.ToCharArray().Distinct().ToArray();
for loop{
var entity = new Color { ID = id, colorArray = colorArray };
session.Store(entity);
}
Session.Savechanges();
This table consists of 1000 or more records.
Now user inputs an array:
char[] userinput=userinput.tocharArray().Distinct().ToArray();
Suppose user's array consists of characters 'r', 'e' and 'd'. I need to list all records which consists of all user inputted characters (i.e. the output records needs to have 'r', 'e' and 'd' characters).
I tried different techniques including following:
.Where(x=>x. colorArray.Intersect(userinput).Count()==userinput.count())
But not working, giving following error: Cannot understand how to translate x.subsetArray.Intersect…