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

Is MvcScaffolding compatible with VS 2015?

I recently upgraded to VS 2015 and now I get the following error when I try and use one of my scaffolders: Scaffold : Cannot get an instance of EnvDTE.DTE At line:1 char:1 + Scaffold Entity + ~~~~~~~~~~~~~~~ + CategoryInfo :…
3
votes
2 answers

Why is MVC scaffolding failing? (w/ different errors in VS2012 vs VS2013)

I'm leveraging a large existing codebase of business objects and their associated data access layer into an ASP.NET MVC web application. When scaffolding views for the business objects, the scaffolding engine fails with the following message in…
UtopiaLtd
  • 2,520
  • 1
  • 30
  • 46
3
votes
0 answers

ASP.NET MVC - Scaffolding a Drop Down List

I'm trying to learn how to use the ASP.NET MVC 4 and Entity FrameWork 5, and I'm a bit confused by scaffolding for Drop Down Lists. I have three classes: public class ScopeType { public int ScopeTypeId { get; set; } [Required] public…
Andy Burns
  • 917
  • 4
  • 8
3
votes
1 answer

MVC 5 - EF 6.1 Scaffolding fails when inheriting from IdentityDbContext and IdentityUser

I have been struggling with the new ASP.NET Identity trying to extend it to do my next web application, I have opend a new empty web project in Visual Studio 2013 Profissional, and added MVC 5 assembly as usual. I have write the following in VB.NET…
3
votes
3 answers

Users with different capabilities

I'm creating an ASP.Net MVC 5 application. In my website, 3 different types of users exist. Admin Normal users Restaurants Each of these users have its own capabilities and access rights. Meaning, the view for each of them should be different. I…
Alireza Noori
  • 14,961
  • 30
  • 95
  • 179
3
votes
1 answer

Get metadata of model (TableName) in mvc4 Using t4 Scaffolding

Using MVC4 and T4 Template(Scaffolding) I am creating a model in mvc4 and specify the table name in DBContext. 1)I need to get the table from Dbcontext against model name. 2)Need to get value from annotation Table. [Table(name:…
3
votes
0 answers

MVC4 Scaffolding, DBContext in different assembly

I've been trying to scaffold out a DBContext class (Code first), which resides in a different assembly with the reference added to the current MVC project. VS2012 is giving me a message that says that the DBContext is in a different assembly and…
edocetirwi
  • 542
  • 5
  • 22
3
votes
2 answers

Error while installing Mvc Scaffolding package using Package Manager Consoler in VS2012

I am new for using Package Manager Console. I need to install Autofac.Mvc3 and MvcScaffolding packages. I tried to install using Package Manager Console by running the below commands. PM> Install-Package Autofac.Mvc3 But I got the below…
3
votes
1 answer

MvcScaffolding for a Services/Repository pattern?

Does anybody know of any examples of an MvcScaffolding T4 template for building Services/Repository pattern? I know that MvcScaffolding comes with a Repository scaffold built in, but I'd like to have it also build a Services layer at the same time. …
reidLinden
  • 4,020
  • 4
  • 31
  • 46
3
votes
2 answers

Error:'Unsupported context type' while creating a new controller

I am going to implement MvcMusicStore using ASP.NET MVC3, Linq to Sql class instead of Entity Framework, MS SQL Server 2008 pro instead of express ed. I got the tutorial from mvcmusicstore.codeplex.com I used Linq to Sql class and the Datacontext…
3
votes
2 answers

MVC 3 Creates a new database instead of using the one specified

I'm creating a new MVC 3 pilot application using Mvc3 and the MvcScaffolding NuGet, everything runs smoothly until i want to use the database i already have. The application keeps creating a database with the…
KoU_warch
  • 2,160
  • 1
  • 25
  • 46
3
votes
1 answer

ASP.NET MVC: Displaying multiple models in one view (one-to-many relationship)

I'm trying to put together (what I thought was) a simple ASP.NET web application using MVCScaffolding and ASP.NET. There is a basic hieararchy of data tables in SQL: dbo.Albums, dbo.Tracks. The model is easy. For albums: public class Albums…
tommy_o
  • 3,640
  • 3
  • 29
  • 33
3
votes
2 answers

How do I use asp.net MVC Scaffolder with a context that is two subclasses down from dbcontext

I have a standard model set. I have a base context class that inherits from dbcontext to add some features I needed. public class MyContext : DbContext { public void MyFeature() { } } I then have my actual Data Context: public class…
3
votes
1 answer

MvcScaffolding one-many relationship

I'm using MVC 4, EF 4.3 and the MVCScaffolding package. I have following simple model classes public class Product { [Key] public int ID { get; set; } [Required] public string Name { get; set; } public virtual Category Category…
Abhijeet Patel
  • 6,562
  • 8
  • 50
  • 93
2
votes
2 answers

Automatically detect all models to scaffold

I have an ASP.NET MVC 4 project with a lot of models to be scaffolded in a custom way. I have customized the templates to create the controllers and views how I want them to be. This all works fine. Now I've written a PowerShell script to generate…
Abbas
  • 14,186
  • 6
  • 41
  • 72