-
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 an [Index] attribute #4050
Comments
I'm not sure about what problems are there due to I had not learned more about it. Anyway, I could not forget So that, I create my own https://www.nuget.org/packages/Toolbelt.EntityFrameworkCore.IndexAttribute This library allows us to easy way to recognize models without round trip between DbContext class and Entity classes. I hope, this library to be useful for some people who could not forget Index attribute, and I hope it does not bother the developer community. |
LOL @ "because it had lot of issues". Thanks for providing solution @jsakamoto Inception when I see #1698 |
@jsakamoto awesome ! |
It would be really nice to move/add IndexAttribute to the This would allow for migrating our existing app piecemeal, and re-using the model both server side (ASP.NET MVC5/WebAPI2/EF6) and in our offline client side apps (Xamarin.Forms) Right now we are using a home grown solution similar to @jsakamoto's Toolbelt.EntityFrameworkCore.IndexAttribute but with our own abstractions package, an EF6 Convention in another package, and an EFCore ModelBuilder 'convention' in a third. |
@CZEMacLeod we definitely intend to have an attribute-based method to define indices in EF Core, but it's unlikely this would reuse the IndexAttribute found in |
@CZEMacLeod Also, the design of the Index attribute in EF6 is not very good, but we're not going to change it for EF6, so Core will definitely have a new attribute. |
Would be nice to have an |
I know you guys are super busy and have a lot of work to do at the moment but can someone please expand why this was taken out of the 3.0 release? Any idea when it might be placed in a different release? |
@tidusjar It was taken out because we don't have enough resources to complete it in time for 3.0. We will re-assess the backlog following the 3.0 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. |
@lajones - Can you put a small design of IndexAttribute which is implemented, how to use it and limitations on it here (and also edit the first post to add it at the top). If you are planning to add it to docs next, then the link to docs site page would also be fine. It would make it easier for people who ends up here searching for this issue to know what we implemented. |
|
Hi guys. It is still in progress, isn't it? |
@Sergio1C as the milestone shows, this was done for EF Core 5.0.0. You can see the documentation for the [Index] attribute on this doc page. |
We didn't bring this over from EF6.x because it had a lot of issues... but opening this issue to track the possibility of adding it in the future since a number of folks have asked for it (see discussion on #1698).
The text was updated successfully, but these errors were encountered: