sexta-feira, 13 de julho de 2012 21:11
Can someone help me to do correct select query from Azure Table storage
The query is symple itself
The question is how to e.RowKey convert ToLower()? This action is not performed on Azure by default
MyEntity en = (from e in serviceContext.CreateQuery<MyEntity>(tablename) where e.RowKey == email.ToLower() select e).FirstOrDefault();
- Editado vitaliyalfa sexta-feira, 13 de julho de 2012 21:13
Todas as Respostas
sexta-feira, 13 de julho de 2012 21:36
You could try to query it like this:
where e.RowKey.Equals(email, StringComparison.InvariantCultureIgnoreCase);
If it doesn´t work, what you could do is:
Option A) make sure you always save your RowKey values in Lowered case (for example), so that when you need to filter it you don't run on this case-sensitivity issue.
Option B) store a numeric value on your RowKey instead, if possible.
Hope this helps!
Cheers, Carlos Sardo
sábado, 14 de julho de 2012 21:15
where e.RowKey.Equals(email, StringComparison.InvariantCultureIgnoreCase);Thanks. It works fine