rivantsov / vita

VITA Application Framework
MIT License
59 stars 15 forks source link

[Question] Matching list of strings #192

Closed jasonlaw closed 3 years ago

jasonlaw commented 3 years ago

Hi @rivantsov ,

I would like to have query in MySQL like below. select * from table where field in ( 'value1', 'value2')

May I know how to achieve that with the EntitySet?

Eg:

var invoices = "001,002,003"; var query = session.EntitySet().Where( x => x.InvoiceNo In invoices) // How to do here?

Thanks in advance.

rivantsov commented 3 years ago

look at TestLinqArrayContains in ExtendedTests project, it contains sample code for this case

jasonlaw commented 3 years ago

Cool, thanks!