I am currently working on scaffolding a database to make a Data Access Layer. I found out that I can modify the EFCore default templates (DBContext.t4, EntityType.t4 and EntityTypeConfiguration.t4) to alter the generation I now want to generate an Interface for each entities, which should simplify the creation of DTO's and the testing, but I cannot find a way to make the command Scaffold-DbContext generate files based on another template (IEntityType.t4).
I tried to create the template and place it in the CodeTemplates/EFCore folder where the others are, hoping that the scaffolding would take every templates in this folder, without success. I saw some solutions using System.IO and the TextTransformation.GenerationEnvironment Property, where you add the template to an already existing one, then create the file, clear GenerationEnvironment and generate the original, and while it should work, I dont want to depend on this method for each templates I may want to add.
Is there a method or a property I could specify in the Scaffold-DbContext command to make it generate my templates ?