Skip to content
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

Why isn't it possible to add indexes via annotations? #10503

Closed
YoshiWalsh opened this issue Dec 7, 2017 · 1 comment
Closed

Why isn't it possible to add indexes via annotations? #10503

YoshiWalsh opened this issue Dec 7, 2017 · 1 comment

Comments

@YoshiWalsh
Copy link

Hi,

On this page it states that "Indexes can not be created using data annotations." but I'm wondering why this is the case. For my project, data annotations seem like a much cleaner way of providing this sort of information. I'd love for my index code to be in the same place as the entity it applies to, rather than all gathered in by DbContext class.

Is there a technical reason this isn't possible/easy, or is it just not implemented?

Thanks,
Josh

Further technical details

EF Core version: 1.1.4
Database Provider:Pomelo.EntityFrameworkCore.MySql
Operating system: Windows 10
IDE: Visual Studio 2017 (15.3.1)

@ajcvickers
Copy link
Member

@YMIndustries It had issues the way it was implemented in EF6, but there is no reason it can't be implemented in EF Core--it is being tracked by #4050

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants