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

MVC Instant Automatic Scaffolding of Entire Model (like Dynamic Data)?

Does MVC 3 have a way to automatically scaffold controllers and views for my entire code first model? For example for each of 70+ classes that I have assigned a DbSet in EF 4.2 code first? Or do I have to re-scaffold between 1 and 100 classes every…
2
votes
2 answers

MVC3 createoredit template now blowing up on nullable int field

After doing some upgrades to my project, suddenly my generated "_createoredit.cshtml" file is blowing up with this: The model item passed into the dictionary is null, but this dictionary requires a non-null model item of type 'System.Int32'. …
Brady Moritz
  • 8,624
  • 8
  • 66
  • 100
2
votes
0 answers

Create NuGet package with a scaffolding only

I have a question, I would like to create a nuget Package, wich only include a custom scaffolding template. I know how I create a custom scaffolding, but I do it ever in an existing mvc project, but now I want to create NuGet package, so that I can…
SharpNoiZy
  • 1,099
  • 2
  • 11
  • 22
2
votes
0 answers

Why aren't HTML fields generated for properties in nested classes of a model when generating a Create view in ASP.NET MVC?

I have a model class "UpdateClaim" with a nested class "Audit" in it. Both classes are in separate files. When I generate a Create view from the "UpdateClaim" model, only the "ClaimNumbers" property under the "UpdateClaim" is creating the HTML field…
Shinda
  • 21
  • 3
2
votes
1 answer

asp.net mvc scaffolding and GUID as the primary key

I have a table with the following structure GUID uniqueidentifier with default value newid(), and set as primary key ID int Description varchar(max) I created an Entity Model using visual studio, and generated the views for editing/deleting etc…
2
votes
3 answers

Package restore failed Issue for Scaffolding items

I have issues creating a Controller with Scaffolding items. I'm working with Visual Studio 2019 - ASP.NET Core Web Application (with MVC) - ASP.NET Core 3.1 I did the following steps: I installed from Nuget Packages…
EzeS
  • 21
  • 1
  • 2
2
votes
1 answer

Scaffolding MVC doesn't load ApplicationDbContext when inherit IdentityDbContext

What I did? First I created a Asp.net web application project (3.1) with Authentication "Individual User Account" Project will already have ApplicationDbContext that inherit IdentityDbContext Scaffolding Identity Pages is not the problem, It run…
2
votes
2 answers

ASP.NET Core 2 - How to remove scaffolded routes?

ASP.NET Core 2.x includes some pre-made scaffolded routes, like the login page, settings, etc. I am working on something that only has OAuth login buttons, and no settings. This means that I don't want users to be able to register with an email,…
Chris Barr
  • 29,851
  • 23
  • 95
  • 135
2
votes
0 answers

MVC Scaffolding Create View Errors

Note: Visual Studio 2017 - v15.4.1 I'm currently following a basic course on MVC and created a controller with Index, Create, Delete etc. When I right click on the Create method and select "Add View" a window opens. I select the following…
Harag
  • 1,532
  • 4
  • 19
  • 31
2
votes
0 answers

Difference between ADO.NET Entity Model Template and Scaffolding

I am learning EF and found two different methods for entity model file creation. The first method uses ADO.NET Entity Data Model Template in Visual Studio which create a .edmx file, dbcontext file and .tt file. The second method I found at…
2
votes
0 answers

MVC5 Scaffolding, Data Context Class Dropdown Empty

Framework .NET 4.5.1, MVC5, EntityFramework 6.1.3 I'm trying to add a new scaffolding item, and when i do, the dropdown is empty except for a single model that i happen to create before i upgraded from MVC4 to MVC5. I've seen a few other topics on…
2
votes
1 answer

Entity Framework Core 1.0 not scaffolding Controller and View

I am following this tutorial, using Visual Studio Community 2015 v 14.0.25431.01 Update 3 and MS .NET Framework v 4.6.91586, but get the following error when I attempt to scaffold the controller, as described: I have tried all the suggested…
PakiPat
  • 1,020
  • 14
  • 27
2
votes
1 answer

Database scaffolding stopped working in .Net Core 1.1

We upgraded our .Net Core 1.0 projects to .Net Core 1.1 and realized that we can no longer scaffold databases in EF Core. Here is the project.json file: { "version": "1.0.0-*", "buildOptions": { "emitEntryPoint": true }, …
2
votes
1 answer

Why does controller scaffolding requires a project that has individual user accounts

I am trying to understand how ASP.NET Core works by following this tutorial. It correctly specifies that, if I want to be able to harness the power of controller scaffolding, I have to create a project and specify Authentication as Individual user…
Alexei - check Codidact
  • 22,016
  • 16
  • 145
  • 164
2
votes
1 answer

Entity Framework Core error on updating an existing record

In my ASP.NET-Core Code First project, I'm getting the following error on SaveChangesAsync() in the following Action Method: Error DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may…