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
0
votes
1 answer

Mvc 3 Scaffolding: the Model passed to the View throws SQL errror

This post has been heavily edited and updated! The Intent: I am writing an app that is essentially a mini ASP.NET MVC 3 accounting package. I am doing it to learn EF 4.1 Code First and Scaffolding The Setup: I am using SQL Server 2008 Express,…
0
votes
1 answer

Change CRUD Scaffolder (Scaffolding) in Visual Studio 2019

I am using Visual Studio 2019, with .NET Framework 4.8, creating ASP.NET MVC 5 software (not Core). I would like to use the CRUD Scaffolder from an older version of Visual Studio (e.g. 2017 or 2015). I have searched on internet and on Microsoft…
Mike
  • 214
  • 1
  • 3
  • 13
0
votes
0 answers

How can I allow a comma in a decimal number in a scaffolded MVC view?

Database is MSSQL and project is ASP.NET MVC Core I have a database which is filled with balls. Each ball has properties like size and weight. The weight property is a decimal value. I made a model called 'Ball' and added the properties to it. I…
0
votes
1 answer

VISUAL STUDIO .NET MVC Cannot Scaffold a razor view

Working with .net5 MVC app, right clicking 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 2 days ago. Any ideas what could be…
0
votes
1 answer

Where does ASP.NET core put automatically created Databases?

I am following an MVC tutorial on ASP.NET core and currently created a movie database application using scaffolding. The application can create and display movies entries but I can't locate the database in my MSSMS.is it hidden? I have looked into…
0
votes
1 answer

Scaffold common base class for all entities without discriminator

Scaffold creates Poco classes like namespace MyDbContext { public partial class Customer { public Customer() { } public string Id { get; set; } public string Name { get; set; } } } How to force it…
0
votes
2 answers

Error scaffolding an API Controller with Actions and Entity Framework

I am going through this tutorial here: https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-6.0&tabs=visual-studio and running Visual Studio Community version 16.9.2. When I try to add a scaffolded item, controller…
0
votes
0 answers

asp.net 5 MVC 1 class for multiple field values / dropdowns

I'm trying to create a MVC app (which is my first one) I have the main class: public class Dataset { public string Uuid {get; set;} public virtual Class2 Field1 {get; set;} public virtual Class2 Field2 {get; set;} public virtual Class2…
Trevirius
  • 217
  • 3
  • 14
0
votes
0 answers

There was a problem running the selected code generator : 'Package restore Failed'

Some weeks before i encountered similar problem of scaffolding error and got the solution. What am i trying is controllers>add>new scaffolded item >MVC controller with views , using entity framework Link:- Error running selected code generator The…
0
votes
1 answer

Cannot Scaffold Login Page for .Net Core 3.1. Error: There was an error running the selected code generator package restore failed

So, I've tried everything under the sun to Scaffold this Login page in my .Net Core 3.1 MVC application. I'm using Microsoft.AspNetCore.Identity for authentication and I'm also debugging and developing using docker-compose. In docker I use a DB in…
0
votes
1 answer

Error running selected code generator The database provider attempted to register an implementation of 'IRelationTypeMappingSource'

I'm using Visual Studio 2019. Before reinstalling visual studio my ASP.NET Core MVC project and scaffolder was working fine. But after that I'm not able to add new scaffolded item. By updating all NuGet packages and then run scaffolder it…
0
votes
1 answer

Creating interface from DbContext

ASP.NET Core 5 MVC application uses EF Core with Npgsql data provider with different child databases. There is a base database. Child databases contain additional columns in tables. Child databases contain all base table tables and columns. How to…
0
votes
1 answer

Is there a way to get Entity Framework to include primary key columns when scaffolding CRUD pages?

I have a .net core 3.1 MVC app with EF 6. I am having it create CRUD pages using the "New scaffolded item" feature based on models that were already generated (I'm doing "database first"). The cshtml files it generates never have the primary key…
Kelly
  • 945
  • 2
  • 18
  • 31
0
votes
1 answer

Tune DB queries for Scaffolding in Razor Pages (.NET and EF Core)

Is there a way to optimize DB queries generated by the out-of-the-box code generated by Scaffolding in Razor Pages? Here is the background information: I have two tables: ToDos/Tasks and Categories. A task is assigned to a category so there is a FK…
0
votes
1 answer

Asp.Net Core 3.0 MVC - Scaffolded Identity Page Routing for Culture Cookie

I have implemented this nuget package for localization in my Asp.Net Core MVC 3.0 app and have found it great. https://github.com/LazZiya/ExpressLocalization For all pages except my scaffolded identity pages it is working fine. When I navigate to my…