EntityQuery<hr_Employee> query = from s in db.hr_Scorings
join ds in db.hr_DayScores
on s.DayScoreId equals ds.DayScoreId
join em in db.hr_Employees
on s.EmployeeId equals em.EmployeeId
select new
{
em.Name,
em.Surname,
s.ScoreDate,
ds.DayScore
};
LoadOperation<hr_Employee> loadOp = this.db.Load(query);
dataGrid1.ItemsSource = loadOp.Entities;
Я не могу заполнить сетку данных структурой сущности, она выдала мне ошибку.
"Cannot implicitly convert type 'System.Collections.Generic.I'System.ServiceModel.DomainServices.Client.EntityQuery<BusinessApplication1.Web.hr_Employee>"
Я нашел код из msdn ;
EntityQuery<Customer> query =
from c in _customerContext.GetCustomersQuery()
where c.Phone.StartsWith("583")
orderby c.LastName
select c;
LoadOperation<Customer> loadOp = this._customerContext.Load(query);
CustomerGrid.ItemsSource = loadOp.Entities;
но как мы можем объединить несколько таблиц с кодом из кода MSDN?спасибо