c# - Linq, combining multiple records into comma separated string, grouped by distinct value -


I am trying to isolate from a group, then create a CSV string:

< img src = "https://i.imgur.com/7NsSCtq.png" alt = "Enter image details here">

[FOr] One-to-many include:

  var allCustomerRoles = (Customers join crawl on CRRole_ID in the customer equals r.Role_ID, select new {cr.Customer_No_, r.Role_ID}); So the question is, can you please tell me how to write the LINQ query to reach the [TO] framework, where client_NO is different and this role_ID value to the CSV string Is added to   

thanks @ red_mader, your link prompted me to solve, what i see here To have:

  var allCustomerRoles = (R.Role_ID in the customer joining RILs is equal to r.Role_ID group r.Role_ID from CR in CR.Customer_No_g select new { customer_no_ = g.Key, Role_ID = string.Join (",", g.ToArray ())});    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -