Combine 2 tables in 1 class using LINQ?

Var results = from c in Customers from p in Payments where p. Customer == c. CustomerRef select new ComplexObject() { Name = c.Name, ... }.

Database cannot be changed :( – Vasilij Jul 13 at 13:08.

Public class CustomerPaymentViewModel { public Customer { get; set; } public Payment { get; set; } }.

I don't know, how to implement association between my classes in your example; and how will look a LINQ query to such new class. The main quest is to leave JOIN behind the scenes. – Vasilij Jul 13 at 13:15.

Usually, I need to write query witn JOIN (ON Customer. CustomerRef = Payment. Customer) to this classes.

It will be better to implement complex class, connected to both tables.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions