Entity framework join example

Jun 26, 2015 at 7:56 PM
How do I join two entities?

They can put an example please
Coordinator
Jun 29, 2015 at 10:17 PM
var orders = (
                from customer in _Repository.GetEntities<Customer>()
                 join order in _Repository.GetEntities<Order>() on customer.Id equals order.CustomerId
                 where customer.Id == 123
                 select new {
                     OrderAmount = order.Amount,
                     CustomerName  = customer.Name
                 }).FirstOrDefault();
Marked as answer by njmube on 6/29/2015 at 2:57 PM
Jun 29, 2015 at 10:27 PM
Edited Jun 29, 2015 at 10:58 PM
Hi.

Thank you very much, works perfect.

Excellent project