Questions tagged [t4scaffolding]

templated Controller creation using generated Data Models

templated Controller creation using generated Data Models

45 questions
2
votes
1 answer

Iterating over [ComplexType] properties in T4 scaffolding?

I am customizing the Entity Framework ASP.NET CRUD templates used for Add=>New Scaffolded Item...=>" MVC 5 Controller with views, using Entity Framework". I am also using the [ComplexType] attribute with classes that are used for entity properties…
2
votes
0 answers

VS 2015 Community - Custom Scaffold - MVC 4 - Custom type

I'm trying to use custom scaffolding on Visual Studio 2015 Community with MVC 4. My model has a custom type, a class created by me. Sample: public class Teste { public DateTime data { get; set; } public string texto { get; set; } …
2
votes
1 answer

Where is the LocalDB database stored?

I wanted to test multiple approaches in building an app (DB first, Model first, code first). After using T4Scaffolding and having lots of issues to DB post modifications, I though EF was not enough flexible. Now I have found a very weird thing. I…
2
votes
1 answer

Right click 'Properties' on VS2012 solution displays: "Object not set to instance of an object" error

Started receiving the "Object reference not set to instance of an object" error when trying to view the properties dialog for a solution in VS2012 after upgrading from NServiceBus v3 to v4. The problem looks like it's the same as raised in this…
stush
  • 67
  • 2
  • 10
2
votes
1 answer

ASP.NET mvc scaffolding with existing repository and mapping POCO to viewmodels

I have an asp.net mvc solution with three projects UI ASP.NET MVC POCO My Domain POCO objects Repository using entity framework and t4 to generate context and POCO classes I want my UI project to use ViewModels not the POCO…
2
votes
1 answer

Can Visual Studio nuget package manager exclude pre-release packages?

I'm using a package for generating email from Razor views caller MvcMailer. This package depends on T4Scaffolding (>= 1.0.7). T4Scaffolding in turn depends on EntityFramework (>= 4.1.10311.0). This shouldn't be a problem because I have Entity…
GC.
  • 1,214
  • 1
  • 10
  • 26
2
votes
1 answer

MVC3/T4 Custom Scaffolder Gives File Exists Error Even When File Doesn't Exist

I have written a custom scaffolder for MVC3 using T4 templates to scaffold a delete stored procedure for a database and table passed to the scaffolder as parameters. When I run the scaffolder the output file is created in the correct place, but I…
1
vote
1 answer

Access metadata (dataannotations) in my model from t4 scaffolding templates

How can I access metadata (dataannotations attributes) in my asp.net mvc model class from a T4 scaffolding template? I'm trying to read the ScaffoldColumn attribute in the T4 template so it should know if must render some columns in the index…
1
vote
1 answer

What is Location for ASP.NET Core Razor Scaffolding templates in VS 2019

My intention is to customize default Razor templates for ASP.NET Core 3.1. To do so, I will add custom HTML to the default T4 Razor templates so that I don't have to update each generated view again and again. But I am unable to find the exact…
1
vote
0 answers

DbContext not working from Package Manager Console

I am unable to Scaffold-DbContext from Package Manager Console. I have to do this instead "dotnet ef dbcontext scaffold" Is there anything I can do to fix this on my PC?
software is fun
  • 7,286
  • 18
  • 71
  • 129
1
vote
1 answer

EF Project Access From Web Forms Scafolding - System.ArgumentNullException

I have a C# EF 6 Database First project("DocRetData") that I am using as my "Model" in a VB.Net Web Forms project. I'm also using the "Web Forms Scafolding" extension. I have added a reference to the EF project and then created "New Scaffold…
dblwizard
  • 595
  • 7
  • 26
1
vote
3 answers

packages not loading well

I installed the MvcMailer package in my project. So I was trying to do the scaffolding but it did not work. I googled on this. I got advices that I should install T4Scaffolding and MvcScaffolding Which I did and restarted my visual studio. but…
1
vote
0 answers

ModelMetadata Attributes Not Inherited

I have a ModelBase abstract class that I want all of my models to inherit: public abstract class ModelBase : IModelBase { // this base should be inherited by all model classes [ScaffoldColumn(false)] public DateTime? LastModifiedDate {…
Jazimov
  • 12,626
  • 9
  • 52
  • 59
1
vote
0 answers

Scaffolding breaks when I move my DbContextClass to Data Layer

I have my DbContext class in the same folder and namespace as my Models (MvcApplication.Models). I thought it would be better to put it in the folder and namespace where my repositories are (MvcApplication.Data). I did that, the code compiles and…
Colin
  • 22,328
  • 17
  • 103
  • 197
1
vote
1 answer

T4 Scaffolding - Powershell Script

I am working on T4Scaffolding, i am using model to generate code, the thing is that the model, thats is POCO for DB, it must have a defined primary key else my code fails, Here is my command Scaffold MyScaffolder smArtistDetails -Force Here is the…
Moon
  • 19,518
  • 56
  • 138
  • 200