Recent change in Table Storage behaviour?
-
martes, 03 de julio de 2012 16:33
Hi
Suddenly our select statement doesn't give the same result as before.Old Code style:
public IEnumerable<XEntity> Select(string key) { var queryResults= from s in mServiceContext.XTable where s.Key== key select s; return queryResults; }
Changed code that is working:
public IEnumerable<XEntity> Select(string key) { var results = from s in mServiceContext.XTable where s.Key== key select s; var query = results.AsTableServiceQuery<XEntity>(); var queryResults = query.Execute(); return queryResults; }Any idea why this has happened? The first time we saw it (around 2012-05-16), it was different behaviour in different storage accounts.
Best Regards
Tommy
Todas las respuestas
-
martes, 03 de julio de 2012 21:09
The first code snippet does not take care of continuation tokens and hence should be avoided. The second one does and is the corrcet code that should be used here. See http://blog.smarx.com/posts/windows-azure-tables-expect-continuation-tokens-seriously for more on continuations.
Thanks,
Jai
- Marcado como respuesta tobeseuser miércoles, 04 de julio de 2012 11:02
-
miércoles, 04 de julio de 2012 11:02
Hi
Thx for the rapid answer and the link!
BR
Tommy

