[방법 1]

Context context = new Context();
LoadOperation<Movie> load = context.Load(jobcontext.MovieQuery());
List<Movie> list = load.Entities.ToList();    -- ERROR 데이터가 들어오지 않는다.
Grid.ItemsSource = load.Entities;  -- Data Binding 되어 들어간다.

[방법 2]
private void load()
{

Context context = new Context();
LoadOperation<Movie> load = context.Load(jobcontext.MovieQuery());
List<Movie> list = load.Entities.ToList();    -- ERROR 데이터가 들어오지 않는다.
Grid.ItemsSource = load.Entities;  -- Data Binding 되어 들어간다.

context .Load<Rm_rmsx_009i_3_Model>(context .MovieQuery(), DatasLoaded, false);
}

public void DatasLoaded(LoadOperation<Movie> lo)
{
     List<Rm_rmsx_009i_3_Model> list = sp3context.Rm_rmsx_009i_3_Models.ToList();
     Grid.ItemsSource = list;  -- List로 받아도 데이터가 들어간다.
}

[방법 3] 람다식을 사용해 보자.

Context context = new Context();

EntityQuery<Movie> query = context .MovieQuery();
            context .Load<Movie>(query).Completed += (sender, args) =>
            {
                List<Movie> list = ((LoadOperation<Movie>)sender).Entities.ToList();
                Grid.ItemsSource = list;   -- Succes
            };

+ Recent posts