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

revert Scaffold command

Scaffolding is a powerful feature and we can generate models, controllers and views very fast from the package manager under visual studio. But if you submit the wrong command, how to revert it ? For example : Scaffold Controller Person…
hdoghmen
  • 3,175
  • 4
  • 29
  • 33
2
votes
0 answers

Scaffolding Get-ProjectType not recognized as the name of a cmdlet

just tried to get the basic basics up and running and getting some fancy error conditions - most probably some basic steps are screwed up but I don't see the point - so some hints are highly appreciated. So whats the setup? VS2010 MVC3 or MVC4…
2
votes
1 answer

MVC3/T4 Custom Scaffolder Gives File Exists Error Even When File Doesn't Exist

I have written a custom scaffolder for MVC3 using T4 templates to scaffold a delete stored procedure for a database and table passed to the scaffolder as parameters. When I run the scaffolder the output file is created in the correct place, but I…
1
vote
0 answers

Call to EnvDTE.TextSelection.FindPattern from PowerShell fails with type mismatch

I'm building a custom scaffolder to use with MvcScaffolding. Trying to automate adding code to the beginning of a method, I came up with the following code: $codeElement = Get-ProjectType "MyType" foreach ($member in $codeElement.Members) { if…
Călin Darie
  • 5,937
  • 1
  • 18
  • 13
1
vote
1 answer

Access metadata (dataannotations) in my model from t4 scaffolding templates

How can I access metadata (dataannotations attributes) in my asp.net mvc model class from a T4 scaffolding template? I'm trying to read the ScaffoldColumn attribute in the T4 template so it should know if must render some columns in the index…
1
vote
1 answer

ASP.NET MVC Scaffolding doesn't work with referenced Models

I have an ASP.NET MVC 3 (Razor) application that references an assembly where the assembly is nothing more than a bunch of entities that I use in my business logic. I'm creating strongly-typed views by referencing entities/models that exist within…
Jed
  • 10,649
  • 19
  • 81
  • 125
1
vote
1 answer

MVC Scaffolding: Is there a Windows PowerShell Command to switch project in a solution?

I am writing a scaffolder to create classes automatically in an ASP.Net MVC 3 project. However, my solution contains four projects (MyProject.Domain, MyProject.Data, MyProject.Services and MyProject.Web), and at some point in the scaffolder, I would…
1
vote
1 answer

Ninject and MVC Scaffolding

I am trying to customise MVC Scaffolding T4 template for Repository so that it creates Ninject bindings in my App_Start\NinjectMVC3.cs class. I can change the template to customise the repository that is created but I am at a bit of a loss as to…
GraemeMiller
  • 11,973
  • 8
  • 57
  • 111
1
vote
1 answer

Dot Net core MVC 7 Identity Unable to resolve service for type

I am Implementing Identity in Dot Net core MVC 7. This is the tutorial I was Following. Then Suddenly Error Came Error Came An unhandled exception occurred while processing the request. InvalidOperationException: Unable to resolve service for type…
1
vote
1 answer

Problem with scaffolding identity in ASP.NET Core 7 MVC app

I'm trying to scaffold identity on UI SuplementShop.WEB.Mvc solution in Visual Studio 2022. I'm new to ASP.NET so I hope somebody can help me :) Open repository on GitHub: (version before…
1
vote
1 answer

ASPNET MVC 3 scaffolding with ajaxgrid or jqgrid

I have an ASPNET MVC 3 project made with Entity Framework 4 (database first). I'm trying to use scaffolding to create CRUDs with jqgrid following: MVC Custom Scaffolding But when I run something like Scaffold ControllerWithAjaxGrid StockItem it…
polonskyg
  • 4,269
  • 9
  • 41
  • 93
1
vote
1 answer

Trying to use MVCScaffolding to create Views with problems

NOTE: I have looked at this link and disabled CustomTools and still receive this error: MvcTextTemplateHost not found I am trying to create custom Views in one command for Create, Update, Details, Filter, and List operations. I am able to add them…
tehdoommarine
  • 1,868
  • 3
  • 18
  • 31
1
vote
1 answer

Problem using SQL Server CE with Entity Framework code-first and ASP.NET MVC 3 and mvc miniprofiler

I am attempting to create an ASP.NET MVC 3 application using C#, Entity Framework 4.0 code-first and SQL Server CE, and the automated scaffolding. Everything works fine until I try to actually use a page that connects to the SQL Server CE database. …
1
vote
3 answers

Access to sql compact 4 db not allowed in ASP.NET MVC 3 Scaffolding

This is a bit of a weird one. I'm doing an MVC 3 code first development using the SQL compact 4 stuff. Its all running fine but I'm getting issues when I try to scaffold a new controller. I fire up the new controller dialog and select my entity and…
1
vote
1 answer

EntityFramework DB First Keyword not supported: 'port'

I want make model using db-first entity framwork. so i enter the command like picture below. but the error message shown as Keyword not supported: 'port'. how do i fix this issue. thanks in advance.