Estoy trabajando con un servicio de datos WCF apuntando a un punto final OData. Si utilizo DataServiceQuery, puedo administrar la continuación sin ningún problema.¿Cómo se manejan las continuaciones en WCF-OData con una consulta URL?
var collection = new DataServiceCollection<T>();
collection.LoadCompleted += (sender, e) =>
{
if (e.Error != null)
{
callback(null, e.Error);
return;
}
var thisCollection = (DataServiceCollection<T>) sender;
if (thisCollection.Continuation != null)
{
thisCollection.LoadNextPartialSetAsync();
}
else
{
var items = thisCollection.ToList();
callback(items, e.Error);
}
};
collection.LoadAsync(query);
Sin embargo, no veo cómo se puede hacer lo mismo para un DataServiceContext.BeginExecute (String url, ...).
_odataContext.BeginExecute<T>(new Uri(requestUrl), x =>
{
var items = _odataContext.EndExecute<T>(x);
//not sure how to get the rest of the items with this method
});
¿Cómo puedo usar el método de consulta basado en url pero aún así obtener soporte de continuación?
Gracias, que trabajó para mí. – EndangeredMassa