Comments (11)
Popular? I think you can run the Tool once specifying the individual physical paths.
At any rate in order to help I need a runnable repro as requested when you created this issue.
from efcorepowertools.
Not sure what I would put in a runnable repo as this is just a case of specifying where to put the files that the tool creates.
myApp.Domain
|--Entities
| |-Movies.cs
| |-Rentals.cs
|
myApp.Infrastructure
|--Data
| |-dbContext.cs
| |-Configurations
| |-MoviesConfiguration.cs
| |-RentalsConfiguration.cs
Now when I run the tool how can you get it to put the dbContext and the Configuration files in the myApp.Infrastructure
project in the solution and then put the entities in the myApp.Domain
project. If I add myApp.Domain.Entities
when I run the tool from the Infrastructure project it will put the file in the myApp.Infrastructure.myApp.Domain.Entities
folder that it will create. It does not understand that there are multiple projects in the solution.
Hope that helps, if not let me know.
Thanks.
from efcorepowertools.
Are you running the tool once or twice?
Also suggest you read the wiki docs for this advanced topic on file placement
from efcorepowertools.
The only way I can figure it out is to run it twice, once in the domain project, so that I can get the entities in the domain project and the run it again in the infrastructure project to get the dbcontext and the configuration files in the infrastructure project. If there is a way to run it once and have it put some files in one project and then put the other files in another project, I would love to know what the secret is. I looked at the wiki, but it is very limited on what all the options are for like the sub-namespaces and stuff. I did not find a way to do it. If I missed it, then I would love to know the secret.
from efcorepowertools.
You need to run it only once
Did you not see the extensive examples in the wiki?
from efcorepowertools.
I have been up and down the wiki and have not seen anything for splitting file outputs to two different projects in one solution. I must not know what I am looking for to find what I am trying to do if you say it is there. Do you have a link to where in the wiki this is at?
from efcorepowertools.
https://github.com/ErikEJ/EFCorePowerTools/wiki/Reverse-Engineering#file-layout
from efcorepowertools.
That only works in the project that the tool is ran in. Because in the efpt.config.json
file there is only one place for the project root namespace, "ProjectRootNamespace": "myApp.Infrastructure"
. If the files are seperated into two different projects in the solution this stops me from saying put the entities in project A and the dbContext and Configurations in project B. This also does not allow for the @Using myApp.Domain.Entities
to be added to the dbContext or Configuration files as again the project root namespace is used, and sub-namespaces are appended to this.
For this to work we would need to add the ability to select the project to add the entities and dbContext and Configuration files to. Either by a dropdown box with the Project names or a textbox to type it in freely. Then the tools would need to make sure it adds the right @Using
paths to the files as needed. Then we can use this tool to separate items as we see fit within the solution with multiple projects.
Hopefully this makes sense now and thanks for your help with the link.
from efcorepowertools.
You can set namespace both for entity classes and DbContext classes.
I need a full repro in order to help you further.
from efcorepowertools.
Ok, I figured out how to get the namespaces to work so that I can point to the right locations in my solution. The only issue is that you cannot just run this one time in the solution, it has to be ran twice, once in each project because I am splitting the models/entities in one project and then the dbContext and configurations in another project. I cannot figure out how it would run once and split this since it seems the tool is project oriented and not solution oriented.
Unless you know of a way to do this, I think it is a limitation of the tool. All you have to do is create a solution with two projects and then try to have the tool separate the items out like I have said and write to both projects. For now, I will just move on as I figured out something that was going to make me touch all the configuration files every time, I regenerated the files by running the reverse engineer process.
from efcorepowertools.
Cool.
If you like my free tools, I would be very grateful for a rating or review on Visual Studio Marketplace or even a one-time or monthly sponsorship
from efcorepowertools.
Related Issues (20)
- SQL Server procedures - named parameters HOT 3
- Table Renaming is not working (or im doing wrong?) HOT 6
- #nullable -annotations not set for procedures HOT 9
- Unable to get result set shape for dbo.SP_* HOT 2
- Project table relationships are not generating correctly HOT 1
- Stored Procedures stopped working in new version HOT 5
- Is the Entity Id navigation property name convention changed? HOT 18
- Add Server Explorer launch button to localized VS versions
- Add an advanced option to add .HasColumnName() to every single property during Reverse Engineering HOT 8
- Add an option to strip a prefix from Model names during Reverse Engineering HOT 2
- Add Visualize DB Schema context menu to Server Explorer
- SqlLite computed columns HOT 5
- Oracle Data source not listed HOT 5
- Add help link on Data Source screen
- Unable to install VSIX for ARM64 HOT 21
- Code error in DbContextExtensions.Sync.cs HOT 5
- How to add Metadata to identity column when create dbcontext HOT 2
- *Procedures.cs missing OnModelCreatingGeneratedProcedures method HOT 8
- Wrong generation or conceptual error? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efcorepowertools.