Closed CorsairRO closed 13 hours ago
This built-in DatabaseModel in EF Core has no knowledge og stored procedures and result sets from these, som the T4 templates ignore them.
You can run the post generation copy from a efpt.postrun.cmd script.
@CorsairRO Hope you got your question answered?
Hello,
thank you again for the very nice tool that you created and you maintain.
I have a question, i would like to use the .t4 templates option in there to generate my DTO classes in a Business Project by just copying all the properties from the Data Generated scaffolded obejcts. So that whenever i refresh a reveng from DB to automatically refresh my business objects.
I have already used the .t4 to customize the objects generated from tables and views and i think i know how to just duplicate them to a business project.
But, i cannot see any way in .t4 to get the stored procedures resultsets in there.
Is there any easy way to achieve that? Are those classes exposed somehow to the .t4 so that i iterate over them in the same style as i iterate through all Tables and Views ? Or i just will have to manually do that every time that i refresh a DB Model for a proc that returns my_sp_Result to manually copy the properties into my_sp_Result_DTO class?
Thank you for your help, Have a nice day
NOTICE: A bug report without sufficient technical and repro details and version information WILL BE CLOSED WITHOUT ANY FURTHER ACTION.
Provide steps to reproduce a bug
Please include a complete description of the issue or link to a project that I can run to reproduce the issue.
Provide technical details
EF Core Power Tools version: (found in About dialog - blue questionmark icon on context menu)
Exact Visual Studio version: (e.g. Visual Studio 2022 17.6.5)
Database engine: (SQL Server, Azure SQL, Postgres, Oracle, Firebird, SQLite, MySQL)
EF Core version in use: (e.g. EF Core 7)
Is Handlebars templates used: no/yes
Is T4 templates used: no/yes
Is a SQL Server .dacpac used: no/yes