efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Allow templates to be placed anywhere instead of CodeTemplates from the scaffolder.

Open AraHaan opened this issue 3 years ago • 3 comments

On old ef6 projects, templates were generated along beside the edmx file (which could have been anywhere they wanted) and the files it generated automatically, in this case it would be great if such thing could be done here for compatibility.

The ability to have the templates picked up from anywhere within our projects from the scaffolder.

AraHaan avatar Mar 16 '22 23:03 AraHaan

Those templates in EF6 generated code directly from the edmx. There was another set of templates in EF6 that were used when generating code first from an existing database which also had to be in a specific place in the project: (we stole the design from ASP.NET Scaffolding)

  • CodeTemplates/
    • EFModelFromDatabase/
      • Context.cs.t4
      • Context.vb.t4
      • EntityType.cs.t4
      • EntityType.vb.t4

But I say all that just for historical context. We should still discuss the feasibility of this issue.

bricelam avatar Mar 17 '22 02:03 bricelam

image

What I got so far on how my code does it.

AraHaan avatar Mar 17 '22 04:03 AraHaan

Now that EFCore 7 has templates, I feel like a lot of the formatting issues could be closed now that is in the backlog.

AraHaan avatar Sep 18 '22 12:09 AraHaan

Note from triage: we don't plan to support this.

ajcvickers avatar Oct 26 '22 11:10 ajcvickers