Questions tagged as 't4'

1
answer

Change the naming pattern of Views that are generated by scaffold

I would like to change the nomenclature in which scaffold generates Views: Default: Create.cshtml Delete.cshtml Details.cshtml Edit.cshtml Index.cshtml I want scaffold to create this: Criar.cshtml Excluir.cshtml Exibir.cshtml Edita...
asked by 03.10.2015 / 20:59
2
answers

Scaffold Template Edition MVC. How to get project reference in Solution Folder?

I'm editing the ASP.NET MVC Scaffold T4 templates and I need to get some extra class information. For example, , of the DisplayName class attribute. I found some examples: var env = (DTE)((IServiceProvider)this.Host).GetService(typeof(E...
asked by 04.09.2015 / 16:22
1
answer

Configure Scaffold to generate classes

How can I configure Scaffold to generate non-standard classes (Controllers and Views)?     
asked by 05.10.2015 / 13:42
0
answers

SolutionDir in the T4 Template

I'm trying to load an assembly into the template T4, however when trying to use $(SolutionDir) my assembly does not load, it only works if I put the full path. This works <#@ assembly name="d:\Projetos\Meus.Scaffold\bin\Debu...
asked by 04.08.2016 / 14:04
1
answer

Error in T4 to SQL .NET

When trying to generate the sql code based on edmx you are experiencing this error    Severity Code Description Project File Line Suppression State   Error Running transformation: System.NullReferenceException: Object   reference not set to a...
asked by 10.04.2017 / 18:52
1
answer

Add Action and Controller in BeginForm's HTMLHelper with T4

I need to add template and controller values to my T4 template, but I can not figure out how to pass the their names. Here's an example: CREATE.cs.t4 @using (Html.BeginForm("Create", "RamoAtividades", FormMethod.post, new {@class =...
asked by 06.09.2017 / 03:13