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

Cannot open database ASP.NET Core Database first

I'm trying to set up a new project in ASP.Net Core using an existing database. When I run the following console command, however, I get a login failed error. Scaffold-DbContext…
0
votes
0 answers

With Core 2.1 and Razor pages, how can I scaffold a model and NOT use the ID field

Scaffold creates code like this Edit Which yields url's like this '.../Students/Edit?id=2' or '.../Students/Edit/2' Something like '.../Student/Edit/0hBMeEjw5Wqm' I am creating a field for each record that contains the database…
user1489765
  • 291
  • 2
  • 12
0
votes
0 answers

Is it possible to do MVC 3/4 (VS 2013/2015) type scaffolding with MVC 5 in Visual Studio 2017?

Back when I was first learning MVC Microsoft provided an amazing experience with scaffolding. Provide a model and it would create a set of CRUD views and actions for you with zero effort related to just that model. Now it appears that the ONLY…
akousmata
  • 1,005
  • 14
  • 34
0
votes
1 answer

Using ASP.net MVC 5 scaffolding in ASP.net Core MVC 2

In MVC 5, when you scaffold a View, Create, with a model - in order to build a form that will be bound to the model - the scaffolder in MVC 5 used columns (col-md-10 and col-md-2) to put labels to the left of textboxes:
0
votes
1 answer

ASP.NET Core Scaffolding Error VS 2017

Using asp.net Visual Studio 2017 I tried to learn making website using MVC. For that I took the reference of this link: https://learn.microsoft.com/en-us/aspnet/core/data/ef-mvc/intro then when to use scaffolding... Some error occured. It occurred…
0
votes
0 answers

Why am I getting this error 'System.Data.Entity.Core.MetadataException occurred '

This is my code: public List GetAllActivityDepreciationType() { using (TrenStarEAMEntities1 dbContext = new TrenStarEAMEntities1()) { // Exception occurs here --v var…
0
votes
1 answer

EF Core Scaffold-DbContext table not included in the selection set

I recently upgraded to.Net Core 2.0, and I'm running into a lot of issues scaffolding an existing database. First of all, when I run Scaffold-DbContext "Server=mysrv;Database=mydb;User Id=uname;password=pword"…
0
votes
0 answers

trouble scaffolding entity framework based controller in ASP.Net Core 2.0

I'm using Visual Studio 2017, v15.3.1 and am trying to follow a tutorial about creating some WebAPI endpoints with Entity Framework, as outlined here In my case I'm using the good old Northwind SQL database instead of the author's blogging example,…
jkj2000
  • 1,563
  • 4
  • 19
  • 26
0
votes
0 answers

Dates Not Retained when using an MVC-Scaffolded Edit

I'm a little embarrassed to ask this because, being fairly new in ASP/MVC, I started my project using the built-in scaffolded controllers/views of Visual Studio. However, I can't find anything online which has the same problem as mine so I might…
0
votes
1 answer

ASP.NET Core 1.1.1 MVC with EF Core - not able to scaffold from controller class

I'm currently facing an ugly Problem while trying to scaffold from Control class. I get the following error: The error text is: There was an error running the selected Code Generator: 'Unhandled Exception: System.TypeLoadException: Could not…
0
votes
2 answers

ASP.NET Core Controller scaffolding: certificate issue

This is related to my other question. Most of scaffolding problem were resolved, but I'm getting error related to certificate: In appsettings.json I have the following: "Kestrel": { "Endpoints": { "Localhost": { "Address":…
0
votes
2 answers

Controller scaffolding doesn't work in VS 2017 preview for ASP.NET Core 2 Preview

I'm trying to use scaffolding to generate MVC Controller with views, using Entity Framework: I created ApplicationDBContext: public class ApplicationDbContext : DbContext { public…
0
votes
1 answer

HttpParseException in scaffolding-generated view code

I get the following exception with the following code in ASP.NET MVC5. I used the built-in scaffolding to generate my view code (List), and it just doesn't work. The exception is about an else block, but it is thrown at the second element in my…
szkup
  • 82
  • 10
0
votes
1 answer

How do I deploy custom scaffolder into an existing mvc project?

I am experimenting with custom scaffolders, using this tutorial: https://blogs.msdn.microsoft.com/webdev/2014/04/03/creating-a-custom-scaffolder-for-visual-studio/ I have created my scaffolder and it builds. Pressing f5 gives me a new VS instance in…
Martin Hansen Lennox
  • 2,837
  • 2
  • 23
  • 64
0
votes
0 answers

Controller Scaffholding fails with exception

I have updated to Visual Studio 2013 update 5 and now I cannot scaffold controllers when I try to scaffold a controller, I get the following error: There was an error running the selected code generator: 'Exception has been thrown by the target of…
MusicAndCode
  • 870
  • 8
  • 22