Specification
Specification copied to clipboard
Implementing additional provider for Azure Storage Tables
Hi there,
I really like the approach via specification and thinking if it is possible to create a provider for Azure Storage Tables. My first guess was to align to the EFCore implementation, but indeed Storage Tables to not provide IQueryable to push the queries down to the data layer.
Obviously, it's not feasible to transfer the whole table content to create an IQueryable over the retrieved data.
So my questions are:
- Does it make sense and is it achievable to build an implementation besides EF?
- How would a starting point look like? As we have to translate the query and take care about PartitionKey AND RowKey. From my perspective, you do not necessarily have the partition key on an entity.
Hi @rgn,
The specification state is held in the form of expressions (not as IQueryable). Then the provider packages translate the state to a required form; in the case of EF, we apply the state on top of the DbSets.
So, if you can write queries for Azure Storage Tables using expressions, then we can create a provider for it. I haven't used the Azure Tables extensively yet. Can you provide some info what is the most common usage? What is the standard set of operations used in the applications? How do you query? How do you save data?
I see in the docs about the Azure Tables client library that you usually use expressions to build the queries. Is this the standard?
double priceCutOff = 6.00;
Pageable<OfficeSupplyEntity> queryResultsLINQ = tableClient.Query<OfficeSupplyEntity>(ent => ent.Price >= priceCutOff);