I am trying to get a single entity from azure table using Patitionkey and Rowkey. Problem I am facing here is that, it is not returning null when no entity has matching Partitionkey or Rowkey.
MyRecordsTable specificEntity =
(from e in serviceContext.CreateQuery<MyRecordsTable >("MyRecordsTable ")
where e.PartitionKey == pkey && e.RowKey == rkey
select e).FirstOrDefault();
I referred following link, it says if no matching, then null should be returned. But I am getting a exception (An error occurred while processing this request.) Internal exception is No resource found.
http://www.windowsazure.com/en-us/develop/net/how-to-guides/table-services/#header-11
This is default behavior for any REST driven data source. If it is not found, a HTTP 404 error is returned. If you want to get NULL instead, you have to use the IgnoreResourceNotFoundException property and set it to true.