This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have a string of id that I want to search on, how can I pass in an array (or some other object) into Entity.Attribute("Id").In ? Not sure what the syntax should look like if I was going to use string literals.. |
|
|
.In() takes params object[] so you can just pass the arguments you need: Find<Member>(Entity.Attribute("Id").In("alice", "bob")); or you can pass an explicit array: object[] ids = new object[] { "alice", "bob" }; |
|
|
Just to add to Ivan's comment you can also just do the following if you receive a list of data that you want to use.
Example: string inValues = "John,Mary,Billy"; var query = Entity.Attribute( "Name" ).In( inValues.Split( ',' ) ); Johan
|
|
|
Thank you both for your response. I had been trying int[] myIds = new int [5] and that was giving me error, but using object instead of int fixes it. |
|