-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for SQL Server sparse columns #8023
Comments
Documentation link: https://docs.microsoft.com/en-us/sql/relational-databases/tables/use-sparse-columns @borisdj - There is no fluent api at present. |
@borisdj It would be interesting to add fluent API extension methods for this for the SQL Server provider. However, it is not a high priority for us, so putting it on the backlog. We would consider at a high-quality PR from the community for this. |
Hey @ajcvickers : I have some time spare on Friday, so I can give this a go? Questions
|
@garfbradaz Yes, that's the appropriate place for the fluent API. It's fine to not have data annotation support for this--there are many places where the fluent API is the only way to configure something. Also, provider-specific attributes for mapping is a space that we haven't yet ventured into. |
Smashing. @ajcvickers . Spent Friday familiarizing myself with the code (and today as well). Quite a complex beast (which is fun to learn). Questions if I may:
Obviously any tests associated with the new code. |
Awesome thanks @ErikEJ |
Has Entity Framework Core come to support SPARSE columns in the meantime? I have made an SQL script by hand, which drops indexes, alter columns to be SPARSE and re-adds indexes because you cannot alter a column to be SPARSE if there's an index, so it could be rather convenient with up-front support for SPARSE so I can get rid of this script. |
@henrikdahl8240 This issue is in the Backlog milestone. This means that it is not planned for the next release (EF Core 5.0). We will re-assess the backlog following the this release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources. |
Note: as mentioned by @henrikdahl8240 in #20880 (comment), SPARSE columns could be a good fit for TPH. |
@ajcvickers Is the EF Core team still open to accepting a solution from the community? If so, I'd like to spend a few more days preparing a PR for review. With the help of the prior discussions in this issue, I was able to locate most places that will require code changes and spent some time getting familiar with |
@jonlouie Yes, still interested, and I don't think there is any reason to put it on hold. :-) |
@jonlouie, just wondering if you had any luck with preparing PR for this? |
@eugbaranov Unfortunately, I did not end finding the time to complete my PR. If you are looking to pick up this issue, here are some places that likely need modifications or additions:
|
I know I can do this with raw SQL in Up method, but can this be done with fluent API.
If it can How, and if not, are there plans to add this feature in future versions?
Further technical details
EF Core version: 1.1.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual Studio 2017
The text was updated successfully, but these errors were encountered: