Table Partitions with Entity Framework Core

Mar*_*mut 7 sql-server entity-framework-core

I have a large database that will use partitioned column-store tables in a redesign. Is it possible to specify the partition in the generated sql with Entity Framework Core 2.2?

This is for an Azure SQL hyperscale database with a table which currently contains about 3 billion rows. When using stored procedures to execute the requests performance is excellent but if the partition range is not specified in the query performance is less that optimal. I am hoping to move away from the inline sql we are currently using in the application layer and move to entity framework core. Being able to specify the partition for the tenant is our only blocker at the moment.

This is an example where clause in the stored proceduure

Select @Range = $PARTITION.TenantRange(@InputTenantId)

Select ..... FROM xxx where $PARTITION.TenantRange(TenantId) = @range
Run Code Online (Sandbox Code Playgroud)

The above query would provide excellent performance but I am hoping I can make the same specification of the partition using entity framework.