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
1
vote
0 answers

Visual Studio and ASP.NET Core 6 MVC : can not scaffolding the view

Working with ASP.NET Core 6 MVC, I right-click in a controller's action and selecting "Add View --> Razor view (not empty)" After clicking "Add", the following error appears : Scaffolding was working well until about yesterday. Any ideas on what…
user20010271
1
vote
1 answer

Can I choose area when Scaffolding in ASP.NET MVC3?

How do I run MvcScaffold in an area in asp.net mvc3? Is it even possible? I would like to execute something like: Scaffold Controller MyModel --area MyArea
Tomas Jansson
  • 22,767
  • 13
  • 83
  • 137
1
vote
1 answer

.net core 6.0 and scaffolding identity

I have an issue around using Areas and Scaffolding Identity in .net core 6. I have tried numerous ways to resolve the issue and the following are the attempts. I'll post code at the end. Created a new MVC project and included Identity from the…
1
vote
2 answers

Many-to-Many Entity Framework Core 6 (junction table not generated)

I've just started to work with Entity Framework Core 6. I am working with a sample database where I have a many to many relationship. I created my database on SQL server. I created three tables: Service, Document, ServiceDocs (used as a Junction…
1
vote
3 answers

ASP.NET MVC 3: External component has thrown an exception

Set up: New MVC 3 project, using existing database. Created an EF file (edmx), used the automatic generator to create the POCO classes and DbContext, then deleted the edmx. Scaffolded a number of controllers and views, using -Repository -Force…
awrigley
  • 13,481
  • 10
  • 83
  • 129
1
vote
1 answer

.NET DB - Scaffolding - Keyless type error

My first time working on a project solo, and first time attempting to scaffold models from an existing DB. Please see attached pictures for the error. Scaffold-DbContext "Server=.\SAPAS_LOCAL_TEST;Database=SAPAS_TEST;Trusted_Connection=True;"…
Vik
  • 126
  • 5
1
vote
0 answers

Could not get the Reflection type for DBContext in ASP.NET Core 5.0 c#

I am using ASP.NET Core 5.0 MVC with the latest version of c# and VS2019 community, and I keep getting an error. I tried to: Rebuild the project Change the c# version to 6/7/7.1 Re-install VS2019 and some other solutions that you provided in…
1
vote
1 answer

Problem with Identity scaffolding in ASP.NET Core MVC

I made a MVC project, that includes 2 projects. class library (.NET Core) - i have my models and services/options here ASP.NET Core Web Application - Controllers, views here I want to add identity to my project. So i found the following NuGet…
user14669223
1
vote
2 answers

MVC 2 to MVC 3: MvcScaffolding fails due to "could not load file or assembly" error

Setup: I am using MVC 3, EF 4.1, Visual Studio 2010 SP1 with Power Tools updated to latest version. With the above installations, I don't need the NuGet packages that were required previously. Everything is RTM. The project has been upgraded from…
awrigley
  • 13,481
  • 10
  • 83
  • 129
1
vote
2 answers

MvcScaffolding NuGet installation: "An item with the same key has already been added"

I'm getting an error when installing MvcScaffolding through NuGet. Has anyone got any suggestions for how to fix the problem? PM> install-Package MvcScaffolding -Verbose Dependency 'T4Scaffolding (≥ 1.0.0)' already installed. Dependency…
Tom Robinson
  • 8,348
  • 9
  • 58
  • 102
1
vote
1 answer

Assp.net Core exeption ('Invalid column name 'ClassRoomClassId')

I have a problem with ASP.NET Core scaffolding. I just applied scaffolding on a simple relational model and I got this SqlException. Microsoft.Data.SqlClient.SqlException: 'Invalid column name 'ClassRoomClassId'.' All I have two…
1
vote
1 answer

There is no Identitiy option for New Scaffolding for VS 2019 Mac

I try to change the design of the login screen but ı couldn't add new scaffolding For Identity as you can see "Add" new scaffolding screen there is no Option for Identity. The project template is .net core > web application with an identity. How…
1
vote
2 answers

How to use `Scaffold-DbContext` command in VS Code

I have been trying to perform scaffolding on my existing database SQL Server in VS Code software so as to create DBContext and entity domain models. However in VS Code the only available commands are Add Package and Remove Package, I need to run…
1
vote
1 answer

Error trying to generate a controller in aspnet core 3 using codegenerator

I am starting a new project in asp net core 3.1.1, using a MYSQL database. I was able to scaffolding the models using the following command dotnet ef dbcontext scaffold…
1
vote
1 answer

MVC3 Model Binding to a Select List

I've been using the MVCScaffolding feature to create a CRUD UI for my data stored using EF4.1 It works well for basic scenarios and binds all the data to text boxes. However, I want the "Title" property of my "Person" object to bind to a select…
FloatLeft
  • 1,317
  • 3
  • 23
  • 40