c# - Entity Framework many-to-many intersect -


I have many-to-many relationships and I need help to get this result

  Public Sector Customers {Public Virtual ILIT & lt; Customer recommendation & gt; Customer priority {receive; Set; }} Public category preference {public virtual icon & lt; Customer First & gt; {Preferred customer prefaces; Set; } Public int DefaultValue {get; Set; }} Public Class Customer Preference {Public Full Value {Received; Set; } Public Virtual Consumer {get; Set; } Public Virtual Priority {get; Set; }}   

Come with the basic value of customer 1 and pref 1, pref2, pref3, 0. If I put a customprime record for the pref1 with Price 1, then I would like to examine this result

the customer. Priority | Price - Customer 1 | Pref1 1
Customer 1 | Pref 2 | 0
Customer 1 | Pref3 0

Thank you.

What you are trying to achieve is done through simple selection CustomerPrime From , make sure that you have given the selection result to customer and priority .

  var query = In the context of the item. Customer Presentation Include (CP = & gt; cp.Customer). Include (CP = & gt; cp.Preference) new {item.Customer, item.Preference, item.Value}; Var Results = Query.toList ();    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -