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
4
votes
0 answers

How to get the -Repository functionality in VS2013 asp.net scaffolding

In the old version of mvc scaffolding that could be installed via nuget, there was a switch for the Scaffold Controller command called -Repository. This used the repository pattern in the generated code for easier unit testing. In the new version…
4
votes
2 answers

Entity Framework TPC Inheritance (Please shoot me now)

I'm trying to build out an entity model and database closely based on the entities defined on http://www.schema.org using Code First and Migrations. The bottom line is all entities are inherited from an Entity "Thing". Migrations build the…
John Palmer
  • 1,032
  • 1
  • 9
  • 23
4
votes
2 answers

Determine if the model's property is not nullable or is required (in MVCScaffolding T4 Template File)

I want write a method to get Nullable State of a property in T4 Template file. I've written it in my TT files but in the T4 files it is different bool IsRequired(object property) { bool result=false; ? ? ? ? ? ? ? ? ? ? ? ? return…
4
votes
1 answer

How can I fix the conflict between Coded UI Test and MVC Scaffolding in Visual Studio 2012 RC

I'm running Visual Studio 2012 RC (all the latest updates have been installed as of 7/11/2012. I have an asp.net mvc 4 solution with a Web Project a Unit Test Project a Coded UI Test Project a Web performance and load Test project When I first…
4
votes
2 answers

NuGet execution policy errors when installing MvcScaffolding package

I'm using Visual Web Developer Express 2010, Windows XP, and using ASP.NET MVC4 RC in a project. I have NuGet v2.0.30619.9119 installed. I'm now trying to install the MvcScaffolding package via NuGet Package Manager Console. I get the following…
asgeo1
  • 9,028
  • 6
  • 63
  • 85
3
votes
1 answer

Error generating

I am trying stuff out on MVC4 Beta. Project is in VS11, EF 5.0-Beta, using Code First approach. Created simple Model poco and DbContext derived class with single IDbSet<> property for model class. Connection string with LocalDb. I noticed when…
3
votes
0 answers

How to use NuGet to scaffold to multiple projects in my solution?

I have 3 projects in my Solution: MVC, Domain, DAL. If I have an entity of Tasks with Domain namespace, what is the command line to scaffold the TasksDbContext & TasksRepository in the DAL, TasksArea and TasksController in the MVC? Thanks in…
user1177440
3
votes
1 answer

T4 Template Get Attributes

I am trying to customise the T4 templates used in MVCScaffolding. I would like to filter out properties which are have the NotMapped attribute. My problem is that the attribute collection seems to be empty. I have tried printing out the attributes…
row1
  • 5,568
  • 3
  • 46
  • 72
3
votes
0 answers

MvcScaffolding can't be installed due to some error occurred

I'm using NuGet Packager Manager v1.5.20831.9017. I'm using Package Manager Console to install MvcScaffolding. There are some error occurred so that I can't Add Controller anymore. The main error message is Unable to find type…
Will Huang
  • 2,955
  • 2
  • 37
  • 90
3
votes
2 answers

Core 3 : No code generator found with the name 'identity'

dotnet --info .NET Core SDK (reflecting any global.json): Version: 3.0.100 Commit: 04339c3a26 Runtime Environment: OS Name: Mac OS X OS Version: 10.15 OS Platform: Darwin RID: osx.10.15-x64 Base Path: …
3
votes
1 answer

ASP.NET Core - Scaffold REST API from Entities

Context As a backend developer, I often have to develop new REST APIs. Because I do know approximately how much time I am going to need to do so, my estimations are often used as a base to define the final price to be proposed to the client. So…
3
votes
0 answers

ASP.NET Core - "Method not found" error when adding controller

I am trying to add an MVC Controller with views, using Entity Framework to my ASP.NET Core Web application project in VS 2017. However when I do it the following error occurs: Method not found: 'Void…
3
votes
1 answer

scaffolding when using DI for connection strings

I have an application written in Core 2.0, using EF Core. I'm using a pattern where: I keep my database connection string in Azure Keyvault. I use program.cs to read a (.gitignore'd) json file with my Keyvault appid/password, go to the Keyvault,…
3
votes
0 answers

Unable to scaffold "date" type columns from MySQL in .net core 2

I've started a new .net core 2 project and I'm trying to import a MySQL database to entity framework. I use this command to scaffold the DB: Scaffold-DbContext "server=localhost;port=3306;user id=user;password=pass;database=MyDB;"…
Shiran Dror
  • 1,472
  • 1
  • 23
  • 36
3
votes
2 answers

Error: multiple types matching the name while Scaffolding ASP.NET Core MVC RC2

I'm developing a web app in Asp.Net Core RC2 according to n-layered architecture. When I try to use scaffolding to generate CRUD Controller and Views, I get the following error. I have separated my Models/ViewModels and Context/Repository Classes…