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
2 answers

Add Identity Scaffolding using Postgresql DbContext in ASP.NET Core 7.0

I have converted my month old project to use Postgresql rather than Sql Server, I tested it and it correctly applies identity migrations and creates the tables. When logged in with Google OAuth it wrote the new record to the database for the google…
0
votes
1 answer

How to restrict access to non-scaffolded identity pages in .NET Core 7?

I have created my .NET Core 7 web app and I have scaffolded some pages, such as 'Register', 'Login', 'Logout' and etc. However, for an example I have not scaffolded the 'PersonalData' page, yet if you add to the url…
0
votes
0 answers

ASP.NET Core MVC: 'format of the initialization string' error when scaffolding from migrated SQL Server database in Visual Studio

Format of the initialization string does not conform to specification starting at index 0. ASp.net core Mvc it migrates form visual studo to Sql sever but it don't work when scaffolding from database enter image description here
teddy
  • 1
0
votes
0 answers

"This localhost page can’t be found" when add scaffolding identity in my project using asp.net core 7.0

When I add scaffolding identity into my project, the page return "This localhost page can’t be found". This is my dbContext class and my program.cs The error page DbContext Class Program.cs I try to find issue on google but all of them does not…
0
votes
0 answers

Microsoft.VisualSutdio.Web.CodeGenerators.Mvc NuGet package install fails

In Visual Studio 2019 I am trying to install some NuGet packages in order to fix the automatic scaffolding (creating controller with views in ASP.NET MVC 5). If I try: Install-Package Microsoft.VisualStudio.Web.CodeGenerators.Mvc -v 3.1.5 Then 2…
John M
  • 14,338
  • 29
  • 91
  • 143
0
votes
0 answers

I cannot access to the login and register view after scaffolding

I am making a web application with ASP.NET Core 5 MVC. I have created controllers and views and now I am trying to implement the identity views so I made scaffolding in my project. It created a new folder Account with the different views that…
0
votes
0 answers

Trying to Scaffold Identity and getting "Package restore failed" exception

I'm trying to scaffold Identity in my Asp.net MVC project, but I always get the error: There was an error runnning the selected code generator: 'Package restore failed. Rolling back package changes for 'myProject' I read that some people resolve…
0
votes
1 answer

Modify MVCScaffolding t4 template for DB First

I am looking to use MvcScaffolding for a website that I already have a database for. I am using the repository switch when scaffolding to create a repository per entity and then editing the file to use the entities rather than the MvcScaffolding…
OneSHOT
  • 6,903
  • 2
  • 23
  • 24
0
votes
0 answers

ASP.NET Core 6.0 EntityFramework scaffolding issue

I am a new C# application in Visual Studio 2022. The default application contains a HomeController with the standard Index and Privacy. I created 3 model entities. They are called Box, Item, and Room. I was able to add a new controller and…
0
votes
0 answers

Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions' while attempting to activate 'DBContext'

I am facing this error when trying to add a new Scaffold item, I have gone through several articles and still not sure were I am getting it wrong PS C:\Solution\SECZ Project> dotnet aspnet-codegenerator --project "C:\Solution\SECZ Project"…
0
votes
1 answer

I cannot access to the login view after scaffolding

I am developing a web application with ASP.NET Core 5 MVC. I have created my own controllers and views and now I am trying to implement the identity views so I made scaffolding in my project and It created a new folder with the different views that…
0
votes
2 answers

Scaffold-DbContext SQL database Views ? ASP NET CORE 6

I am new to .Net Core and I'd like to know scaffold EF support sql view like it supports sql table in .Net Core 6? If it supports which command will do? For tables,Scaffold-DbContext and is it same command? Thank you very much in advance!
0
votes
1 answer

Unable to add global AuthorizeFilter when using scaffolded Identity pages in ASP.Net Core MVC application

I created ASP.Net Core MVC project from template with enabled Identity. I created db from migration files using update-database command. I was able to run application, register users and login. I added AuthorizeFilter…
0
votes
1 answer

How to reverse engineer Postgres 9.0 database

ASP.NET Core 6 MVC application uses EF Core with Npgsql. Reverse engineering Postgres 9.0 database using scaffolder.ScaffoldModel(connectionString.ToString(), dbOpts, modelOpts, codeGenOpts); Throws exception Npgsql.PostgresException (0x80004005):…
Andrus
  • 26,339
  • 60
  • 204
  • 378
0
votes
1 answer

MVCScaffolding ' Invoke-ScaffoldTemplate : Error HRESULT E_FAIL COMException '?

All of a sudden I am getting the following from my MVCScaffolding command in PMC : Invoke-ScaffoldTemplate : Error HRESULT E_FAIL has been returned from a call to a COM component. At line:1 char:23 + param($c, $a) return . <<<< $c @a +…