linq - IQueryable contains any of string array -
I'm not sure why I slow down when I want to find a database for a database with a string from an array .
objectFactory.Resolve & LT; IUserDao>. () Query. Where (t => (spltedInput.Any (val => T.ListName.Contains (val)) || spltedInput.Any (val = & gt; T. Name.Contains (val)) & amp; MasterCompany.Id == MasterCompanyets). Select (T = & gt; new {name = t.mic + "" + + t.ListName, Id = t.Id}). AsEnumerable (). Choose (t => New RadComboBoxItemData () {Text = t.Name, Value = t.Id.ToString ()}) .toArray ();
This throws NullReferenceException, I'm not sure what to do to see if any element from Ererem is in the last name or name and what is the reason for this exception.
I'm just guessing that you can not do a query inside a query because it is?
I suspect that either your objectFactory
or < Code> IUserDao is probably null and therefore you get a NullReferenceException
. Did you debug it, the debugger will tell you what the object is.
Comments
Post a Comment