-
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
Reverse Engineer: Table/Schema Exclusion #6182
Comments
See also this comment: #5126 (comment) |
Are there any news on the implementation of this functionality? I think it would be useful, for example, when a table causes an error in the generation of the scaffold. I had this happen in #13528. As a workaround, all tables had to be referenced manually using the |
Maybe EF Core Power Tools can help you? (Persists the table selection) |
The extension is only available for VS2017, right? I mostly use VS Code and run commands with the CLI (Linux user). 😓 |
While there is some value in doing this at the command line (i.e for cross-plat), that value is diminished by the Power Tools, which seem to be the preferred choice of most people doing reverse engineering. This combined with table/schema selection being possible anyway means that we've decided not to implement this. However, we would not be against a well-written and robust community contribution to implement this. |
After looking up the code, I think that with a bit of guidance, this could be an easy implementation. I'll give it a shot over the weekend. |
I have been working on it over the weekend, with the idea of adding a parameter To propagate these values to the database providers, the Could it be implemented as an optional parameter, to avoid the breaking change? Or is it prefered to update the providers to support this feature? If needed, a PR could be created to better review the change. |
@bricelam @smitpatel Is breaking |
Yeah, probably. Should add excludeSchemas at the same time. BUT, I still feel like it’s better to add a command/API to get a list of all the tables and implement exclusion at a higher level. (e.g. via a PowerShell/bash script) The Power Tools already work this way. |
Re-opening so we can discuss @bricelam's comments in triage. |
Being able to get the table list would be great, in Power Tools I currently have to use a custom way per ADO.NET provider to get the table list. |
Could a The command woud be invoked internally before a scaffolding operation if the |
@Starkie We discussed this in triage and it seems like a reasonable idea. The only caveat is if it is too slow, but if the command specifically gets just table/schema name, and not everything else associated with the table, then it's probably okay. Also, see #14602 which is about allowing new command functionality without always breaking the interface. |
@ajcvickers Is this still open for a reason? (closed-wont-fix) ? |
We should probably file a new issue for adding a command (and API) to get a list of tables... |
@bricelam I would like to have a look at this, but before I begin it raises a number of design questions. |
If you draft a proposal, I can present it to the team in a design meeting. |
Hi Thankx |
@ikuntalb This issue is in the Backlog milestone. This means that it is not going currently scheduled for the next release. We have not finished planning for 5.0, so this may change. However, keep in mind that there are many other high priority features with which it will be competing for resources. |
Hi, |
@robinNode you can specify -table options to include only the tables you want. You can also use EF Core Power Tools, gives you a GUI to select tables/views, and persists your selection. |
Hi. Since I'm using SQL Server, I've decorated
And the implementation of
I've also created a blog post with more details which can be read here. |
@florinciubotariu why were you unable to use EF Core Power Tools? |
I had to implement a custom pluralizer (to be as similar as possible to EF 6) and I saw the EF Core Power Tools didn't pick up my implementation of |
@florinciubotariu You can opt in to use the Legacy pluralizer, should be 100% EF6 compatible. |
@florinciubotariu If it is not compatible with the EF6 pluralizer, let me know (via a repro) and I will get it fixed |
EF Core 5 preview - checked EF 6:
EF Core Power Tools:
last one is ok but when using: EF Core 5 preview - checked I get: EF 6:
EF Core Power Tools
I can't use Pluralize and singularize generated object names because I have column names ending in ID in my tables. |
In the latest daily, you can combine UseDatabaseNames and Pluralization with EF Core 5. Looking forward to your repro in the EF Power Tools repository |
Good question and after reading through all the comments I am still a bit confused on what this issue is trying to do. The title still indicates an exclude option but some of the discussion seems to go in different directions. Based on numerous other issues that have been closed as duplicates, I gather the point may still be adding an exclude option. In any case, I sure hope the exclude option is still the purpose. |
Is this feature ready? I need to exclude a table. |
It is in EF Core Power Tools CLI, yes. But not in the standard CLI tooling @MikeMcWilliams |
Thanks @ErikEJ. That unfortunately is not an option for me, I am using I am only looking to skip the See, I have a partial dbcontext that inherits from Is there a way to tell the scaffolding that I'm using DataProtection? This seems like it would be a very common practice for apps behind a load balancer and would be used often. |
@MikeMcWilliams How would the naive tooling support help here??? |
Is there any update for this feature? |
This issue is in the Backlog milestone. This means that it is not planned for the next release (EF Core 8.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. Make sure to vote (👍) for this issue if it is important to you. |
Have the ability to specify tables/schemas to be excluded, useful for excluding AapNet* tables etc.
The text was updated successfully, but these errors were encountered: