SilverlightRIAWCFサービスアプリケーションに次のコードがあります。
protected override void OnNavigatedTo(NavigationEventArgs e)
{
EmployeesService2 context = new EmployeesService2();
EntityQuery<Employee> query = context.GetEmployeeQuery();
context.Load(query);
int count = context.Employees.Count();
EmployeeGrid.ItemsSource = context.Employees;
}
グリッドにアイテムを入力しますが、context.Employees.Count() = 0
。なんでそうなの?
別の問題は、別のエンティティモデルとデータベースに基づく別のドメインサービスに対して、別のページに同様のコードがあることです。しかし、その場合、サービスはエンティティを返しませんでした。その理由として考えられるものは何ですか?データベースは空ではありません。