Comments (3)
@jan-diputado Please ask the Handlebars questions in the Handlebars repo.
For T4, they certainly supports multiple sets of templates.
Please refer to the wiki, and "The tool just breaks" is not a useful error report.
from efcorepowertools.
@ErikEJ, Sorry, I should have put more details; I was hopeful that there was a handlebars solution.
For T4 approach, I don't understand what is to be placed in T4 template path; I tried the following on my project:
..\..\
DB1
DB1\CodeTemplates
DB1\CodeTemplates\EFCore
DB1\CodeTemplates\EFCore\
/DB1/CodeTemplates/EFCore
but none of them worked. The CodeTemplates\EFCore folders are not created.
It only works when the path is blank.
Then, when I move the folder to the correct location and change the T4 template path, the tool just ignores it and places all models and db context on the base folder (DB1 folder), instead of folder paths I defined on the tool.
Below is the content of efpt.db1.config.json
{
"CodeGenerationMode": 3,
"ContextClassName": "DB1Context",
"ContextNamespace": null,
"FilterSchemas": false,
"IncludeConnectionString": false,
"ModelNamespace": null,
"OutputContextPath": "DB1\\Context",
"OutputPath": "DB1\\Models\\Entities",
"PreserveCasingWithRegex": true,
"ProjectRootNamespace": "Project1.EntityFrameworkCore",
"Schemas": null,
"SelectedHandlebarsLanguage": 2,
"SelectedToBeGenerated": 0,
"T4TemplatePath": "DB1\\CodeTemplates\\EFCore\\",
"Tables": [
{
"Name": "[dbo].[TAB1]",
"ObjectType": 0
},
{
"Name": "[dbo].[TAB2]",
"ObjectType": 0
}
],
"UiHint": null,
"UncountableWords": null,
"UseAsyncStoredProcedureCalls": true,
"UseBoolPropertiesWithoutDefaultSql": false,
"UseDatabaseNames": true,
"UseDateOnlyTimeOnly": false,
"UseDbContextSplitting": false,
"UseDecimalDataAnnotationForSprocResult": true,
"UseFluentApiOnly": true,
"UseHandleBars": false,
"UseHierarchyId": false,
"UseInflector": false,
"UseLegacyPluralizer": false,
"UseManyToManyEntity": false,
"UseNoDefaultConstructor": false,
"UseNoNavigations": false,
"UseNoObjectFilter": false,
"UseNodaTime": false,
"UseNullableReferences": false,
"UsePrefixNavigationNaming": false,
"UseSchemaFolders": false,
"UseSchemaNamespaces": false,
"UseSpatial": false,
"UseT4": true
}
Let me know if you need more info.
from efcorepowertools.
@jan-diputado Thanks.
The path should point to a folder where there is a CodeTemplates folder below, I have updated the docs
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)
- Question HOT 2
- Ef Power tools not appearing on the Context Menu HOT 2
- Smoother Typing/Search on the "Choose Your Database Objects" Panel HOT 2
- Reverse Engineering causes System.IO.FileNotFound exception HOT 3
- Permits break execution HOT 7
- problem to install EF Core Power Tools on Visual Studio 2019 HOT 3
- SQL Table Function primary key issue HOT 10
- Reverse engineering doesn't pick up key HOT 3
- Version 2.5.908 of EFCorePowerTools.vsix needed HOT 1
- Limitation of sp_describe_first_result_set... HOT 1
- Scaffolding Reverse Engineering HOT 8
- Link to Download EF Power Tools Package 2.5.1236 or a version that supports .Net Core 3.1 HOT 1
- Update of EFCorePowerTools Update fails HOT 10
- Emit System.CodeDom.Compiler.GeneratedCodeAttribute on generated classes HOT 3
- DatabaseFacade - SqlQueryRaw not found HOT 7
- Any way to set a default value for a property? (Question, not a bug) HOT 1
- How do you use spatial types when scaffolding using the NuGet package? HOT 3
- Reverse engineering is stuck in a loop that crashes visual studio 2022 Version 17.10.4. HOT 4
- Migrations context-menu is missing HOT 2
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.