1

I am exposing my Table via the following method:

public static class TableCacheService
{
    public static IEnumerable<Myentity> Read()
    {
        var acc = new CloudStorageAccount(
                     new StorageCredentials("account", "mypass"), false);
        var tableClient = acc.CreateCloudTableClient();
        var table = tableClient.GetTableReference("Myentity");
        return table.ExecuteQuery(new TableQuery<Myentity>());
    }
}

Here's a usage example:

    var nodeHasValue = TableCacheService.Read()
                                        .Where(x => note.ToLower().Contains(x.RowKey.ToLower()))
                                        .Any();

But supposedly x.RowKey is null!

enter image description here

It looks like there are 2 members both called RowKey. One of them is a TableEntity:

enter image description here

How do I access the RowKey that is non-null? Am I incorrectly querying the table?

Alex Gordon
  • 191
  • 11

1 Answers1

1

It seems you have hiding properties RowKey and PartitionKey inside your Myentity class.

I guess your Myentity class has something like it:

public class Myentity: TableEntity
{
    public new string RowKey { get; set; }
    ...
}

Pay attention to keyword new.

If you have this construction you need to delete this property.

More information about hiding and overriding you can find here.

Also please review work example with ATS (Azure Table Storage) is here.

Alexander I.
  • 2,380
  • 3
  • 17
  • 42