Questions tagged [asp.net-mvc-scaffolding]

ASP.NET MVC Scaffolding is a scaffolding package for quickly generating a basic outline of your software that you can then edit and customise.

ASP.NET MVC Scaffolding is a scaffolding package for quickly generating a basic outline of your software that you can then edit and customise.

A tutorial is found on Steven Sanderson's blog.

Installation

MVC Scaffolding can most easily be installed through its NuGet package.

Install-Package MvcScaffolding
364 questions
2
votes
1 answer

Where is Controller Scafolding in .Net Core 1.0.0 with Visual Studio Update 3

I'm using the latest ASP.net Core bits (1.0.0-preview2-final with Visual Studio Update 3) and the Add > New Scafolded Item seems to have gone for the 'Web Application' template. It was there in RC2. I've seen this SO post saying that you need to…
2
votes
1 answer

asp.net mvc5 scaffolding Unable to retrive metadata for ...Ambiguous match found

Problem: When I want to create controller from EF codefirst context it give me this error: There was an error running the selected code generator.Unable to retrieve metadata for Model.class name.Ambiguous match found. See Error Image What I…
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
0 answers

Scaffolding for Visual Studio 2015 or ASP.NET MVC

Does a feature exist for Visual Studio 2015 that does reasonable scaffolding for ASP.NET MVC? What I mean by "reasonable" is this: DateTime fields are generated as Date drop downs (or Time). ID References to foreign keys are dropdowns listing…
2
votes
1 answer

Unable to add a view in MVC 5.2 Application .. Scafolding fails

I am simply trying to add a view for a Action in MVC 5.2 Application by right clicking in the Action method clicking on Add view Adding the view name press ok I see a visual studio dialogue which says Scaffolding... However after 30 seconds or so…
2
votes
1 answer

ASP.NET MVC Show created files in custom scaffolding

It is a really basic question, so I'm sure the answer is somewhere out there, but I couldn't find it anywhere. I've made a custom scaffold for a project I'm working in. I followed this tutorial. When used, it creates the controller and 3 other…
Diego
  • 16,436
  • 26
  • 84
  • 136
2
votes
3 answers

Models with List<> in them .. How does this work with Entity Framework?

I'm new to ASP.NET, and am wondering how to create CRUD pages for a Model which has Lists of other Models ? I followed this tutorial, which creates CRUD pages for a simple scenario in which the Model has primitive data types only. So as such, the…
Ahmad
  • 12,886
  • 30
  • 93
  • 146
2
votes
1 answer

ASP.NET MVC 5 - Scaffolding for Many to One Relationship

I am Working on ASP.NET MVC 5, EF 6, Razor Engine, VB Language and Database First Approach with VS 2013. Now, in my DB; I have two tables as below: CREATE TABLE [dbo].[Group] ( [Id] INT NOT NULL PRIMARY KEY IDENTITY(1, 1), …
2
votes
1 answer

Add Scaffolded Item to a Class Library

In a web project, when I right click on the project or a folder, I get Add -> New Scaffolded Item as an option. However, when trying this in a Class Library project, the option is not there. Right now, I'm adding the item in my web project and…
Chad Schouggins
  • 3,440
  • 2
  • 23
  • 29
2
votes
2 answers

MVC5 using scaffolding for classes from other namespaces (referenced DLL)

Is it possible to use the MVC5 Scaffolding to create a new Controller with View, using EntityFramework if the Models and DbContext classes are not in the same namespace. I have defined the models and dbcontext in 2 separate libraries…
neo112
  • 1,703
  • 2
  • 17
  • 39
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

Scaffolding Controller in MVC 4, Solution to error: "Error: Unable to retrieve metadata for 'Model'. The argument 'connectionstring' cannot be null

When trying to create a controller in MVC 4 with Scaffolding (EF and CRUD), I got the following error: "Unable to retrieve metadata for MyModel. The argument 'connectionString' cannot be null, empty or contain only white space." I spent quite some…
2
votes
2 answers

MvcScaffolding and Hinting to find Enums and related classes

So I've got a Deeply connected POCO that I've written using EF5/Code First, it has one-to-one, and one-to-many relationships with a number of classes and Enum properties for things like Gender, AddressType and so on. A very simplified view: public…
Russ Clarke
  • 17,511
  • 4
  • 41
  • 45
2
votes
3 answers

The term 'scaffold' is not recognized as the name of a cmdlet, function, script file, or operable program

I've been developing an ASP.NET MVC 4 project for a while now and I've been using the "MVCScaffolding" package successfully but a few days ago I noticed that when creating a new controller for example the item for MVCScaffolding does not show up…
2
votes
1 answer

CamelCase a word in Powershell / Templates

I've looked everywhere and I can't seem to find an answer, maybe because I don't know enough to know what to search for. I've used the Get-PluralizedWord function. Is there a similar way to convert a given word like MyClass, to myClass in…
Jamez
  • 1,559
  • 1
  • 15
  • 26