There are 2 datatables structured in this way:
Foreach row in Dt1 can correspond many rows in Dt2 (1 to N) joining EmailKey on CustomerId, so I want to flatten result inside 1 record by using the SelectMany func. How can I achieve this?
I don't think SelectMany is what you're looking for. SelectMany .
Depending on what you are trying to do, You can try Union or distinct. You might want to rephrase your question slightly, including if you are trying to "flatten" the results in the select or in code(after you have populated the DataTables).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.