Questions tagged [scaffolding]

1

votes
1

answer
238

Views

Cannot Scaffold (EF, Core 2.1) model that contains a 'bool' item

My model looks like this: namespace Flow.Models { public abstract class Project { public int ID { get; set; } public String HashID { get; set; } public string FileLoc { get; set; } //Use HashedID above. public bool Network { get; set; } public int ClientID { get; set; } public int FirmID { get;...
user1489765
0

votes
0

answer
7

Views

How to customize views templates?

I'm trying to change the default T4 code of views in MVC5 views templates. what should I do? I have created a CodeTemplates folder and copied the default T4 files and changed them but nothing happened! This is the address where I picked the files 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\...
Arash Masir
0

votes
0

answer
13

Views

Creating a UWP solution in Visual Studio Code

I'm trying to create an UWP application in Visual Studio Code. I want to create an app with a ribbon like interface (the interface used in Microsoft office), and since I this is my very first attempt to use VSCode I have no idea how to create the project. At the VSCode terminal help I saw a many di...
Jonatas Povoas
1

votes
4

answer
5.3k

Views

Best Laravel Scaffolding Crud Generator? [closed]

Adding crud forms manually is very painful for me. Is laravel a good way to do this?
Rohullah Rajaee Rad
1

votes
0

answer
143

Views

Customising ASP.NET Dynamic Data with ADO.Net Entity Data Model for Ready Only and Audit

I previously followed the below tutorial on Dynamic Data scaffolding with Entity framework: https://www.youtube.com/watch?v=hWatePj2RmE (Part 1 and Part 2) (ASP.net Scaffolding, Dynamic Data with Entity framework) I used this tutorial to implement a table editing solution, that does the following: D...
DIG
1

votes
0

answer
269

Views

Scaffolding Error Microsoft.EntityFramework

I am currently learning how to work with Razor Pages using the following tutorial on Microsoft's Website: Getting Started with Razor Pages in ASP.NET Core In the Add a Model section of the tutorial, it shows how to Scaffold using the Command Prompt. However, upon executing the command, I am met w...
OPM eStudio
1

votes
0

answer
44

Views

Unable to find a simple grails framework like scaffolding for Laravel 5

I have picked up laravel again after some years and now I am running version 5.6. So being introduced to scaffolding the first time by grails, it looks I am strongly influenced by its simplicity. I am looking for a similar scaffolding generation 'system' that will pick my Eloquent Models or migratio...
black sensei
1

votes
0

answer
16

Views

Scaffolding from Visual Studio 2017 Package Manager produces no files

I run scaffolding from Visual Studio 2017 Package Manager it runs without errors but produces no files. I did try some workaround as suggested here but still no luck https://github.com/aspnet/EntityFrameworkCore/issues/10473
Neeraj Kumar
1

votes
0

answer
33

Views

MVC scaffolding not working on converted MVC 3 to 5.2 file

Hi Folks, I recently upgraded an existing solution from MVC/.NET 3/4 to 5.2/4.5. I'm getting the above error when I right click > add > view. The frustrating part is that scaffolding works on a brand new project, which I am using to generate code for the older project/solution. I am using VS 2015....
1

votes
1

answer
465

Views

How to Update ASP.MVC scaffoldings from Bootstrap 3 to Bootstrap 4 on VS2017?

I've been searching (googling) on how to update my asp.net mvc scaffolding's from BS-3 to BS-4 !! i try to update from nuget but it only updates bootstrap files scaffolding remains same for bootstrap 3. I found an answer on stack-overflow but it was for asp.net core and following those steps doesn't...
Arslan Ameer
1

votes
0

answer
52

Views

Create scaffolded item with Powershell

In our project we have far more than 200 model classes where we have to write a web api Controller for most of them. So I tried to generate them automatically with a template and Powershell. I tried to use TextTransform.exe TextTransform.exe -a !!ModelTypeName!CustomerModel -a !!ControllerName!Custo...
Obl Tobl
1

votes
1

answer
331

Views

How to Create Custom Generate/Scaffold Templates(Razor) in ASP.NET MVC in Visual Studio 2017?

How to Create Custom Generate/Scaffold Templates(Razor) or Modify Default in ASP.NET MVC in Visual Studio 2017? I want to add or modify code generator for ASP.Net MVC project not ASP.NET Core. I found Razor Template in C:\Users\....\.nuget\packages\microsoft.visualstudio.web.codegenerators.mvc\2.0....
Mahdi H
1

votes
0

answer
229

Views

flutter, get items from sqflite and show in listview with ontap

my qustion as about flutter and sqflite. i want to get all items from sqflite and show to the listview.builder. in part two i want to taped on item of listview and navigate to another page with one parameter, and in new page generate a new listview.builder with new items. homepage : body: Center( ch...
david
1

votes
1

answer
48

Views

How do I revert to controller based identity and authentication in .NET Core 2.1

I would like to use a Controller based Identity with .NET Core 2.1. I would like to scaffold the UI but the scaffolder creates Razor Page based identity. I would like to use controllers instead of Razor Pages. Is it possible to scaffold this?
gyurisc
1

votes
2

answer
43

Views

DropDownList value insert in database as foreign key

I am trying to insert a categoryID to the table Post, but my code is creating a new category instead of using the selected value from the dropdownlist. I am starting to study ASP.NET MVC, so I don't know how I can solve this. I can get the real value from dropdownlist but when the insert query runs...
JNeves
1

votes
0

answer
80

Views

How to add a custom scaffolder to aspnet-codegenerator with dotnet core 2.2

I am trying to add a custom scaffolder to aspnet-codegenerator. My goal is to generate a service layer between the controllers and DbContext using the scaffolder. I've forked the aspnet/Scaffolding repository into my own repository and tried to add a service option to the command line tool under the...
bascoder
1

votes
1

answer
39

Views

grails v3.3.9: how to keep scaffolded views separate from rest API

grails v3.3.9 I'd to be able to used scaffolded views /controllers but keep these separate from my rest API views and controllers. I started my project app to generate jsonApi so i setup my UrlMappings with something like this ... '/api/sites'(resources:'site') { '/devices' (resources:'device') } ....
WILLIAM WOODMAN
1

votes
1

answer
534

Views

Subsonic 3 and Scaffold

In Subsonic 2 I played around with the Scaffold controls to build some quick and dirty admin pages. I need to do the same again but am using Subsonic 3 where I don't see Scaffold anywhere. Is Scaffolding in Subsonic dead? Any other recommendations to get admin pages for db tables (ms sql) up as fas...
Mike
1

votes
1

answer
876

Views

Ruby on Rails Scaffolding : Two foreign keys for the same table

I'm a beginner to ruby on rails that's migrating an access database to RoR. In the database there is a table named tasks and a table named users. The table tasks has two foreign keys to the table users: task_created_by and task_finished_by. I wanted to create everything using the scaffold tool. Is i...
Kovags
1

votes
1

answer
1.2k

Views

MVC3 Scaffolding - customize view templates

I'm using the MVCScaffolding nuget package. Where can I find documentation on the values we can use when customizing our MVC scaffolding templates? i.e. I have done PM> scaffold CustomTemplate View Edit which creates the Edit.cs.t4 template for me. It has things like: I would like to use something...
Matt Frear
1

votes
2

answer
1.6k

Views

MVC 2 to MVC 3: MvcScaffolding fails due to “could not load file or assembly” error

Setup: I am using MVC 3, EF 4.1, Visual Studio 2010 SP1 with Power Tools updated to latest version. With the above installations, I don't need the NuGet packages that were required previously. Everything is RTM. The project has been upgraded from MVC 2 to MVC 3. I initially tried the upgrade tool,...
awrigley
1

votes
4

answer
520

Views

ASP.NET MVC 3 with already built SQL Server on different databases

I'm creating an ASP.NET MVC3 project in C# that is using an already existing SQL Server database. The SQL Server has different databases, one for each customer. Each customer database has numerous tables, but I'm interested in only one table. So, I'm interested in retrieving (and not updating or de...
Attila
1

votes
1

answer
486

Views

Can I choose area when Scaffolding in ASP.NET MVC3?

How do I run MvcScaffold in an area in asp.net mvc3? Is it even possible? I would like to execute something like: Scaffold Controller MyModel --area MyArea
Tomas Jansson
1

votes
1

answer
1.1k

Views

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. My connection in the web.config is this My model...
Steve French
1

votes
1

answer
267

Views

MVC2 scaffolding - can't see any data

I'm having a problem seeing any data in my MVC2 application. I'm using your typical scaffolding setup, but when I view the index or details page I see no data at all. I'm sure I'm missing something simple here as I get no errors when compiling or running. Here is my model(Users.cs): public class Use...
Mr Lahey
1

votes
1

answer
1.4k

Views

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 says: Invoke-Scaffolder : A positional parameter canno...
polonskyg
1

votes
1

answer
597

Views

CakePHP: Tree list scaffold

I have a SQL table called Sections with the following columns Id | Name | Parent_id I had generated the code with cake bake. The problem is that if you add a new section, I cannot choose the parent category. It works only when the controller uses scaffolding. What is the problem?
Mirko Vandrák
1

votes
1

answer
370

Views

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 how I can causes the template to add content to a se...
GraemeMiller
1

votes
1

answer
593

Views

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 need to switch project programatically. Is there a...
1

votes
2

answer
1.3k

Views

Grails scaffolding only for admin users?

I'm wondering is there a way to isolate scaffolding to be available only to admin users and implement my views for viewing domains in Grails? Anyone have idea how to do that? Regards, Mika
blackuprise
1

votes
1

answer
1.5k

Views

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 view Thanks
Rodrigo Juarez
1

votes
1

answer
2.5k

Views

generate scaffold under devise user in rails 3.2

I use devise, and I want generate a new object scaffold under devise user sth like: resources :users, :path => '/', :only => [:show] do resources :collections, :controller => 'users/collections' end With above routes, I get this url: http://localhost:3000/kevin_doe/collections The problem is that if...
hyperrjas
1

votes
1

answer
1.5k

Views

Cannot insert the value NULL even though column allows null

I'm testing out scaffolding with Entity Framework in Asp.Net MVC 4 (by following this article). I get it to work fine, except that even though my domain object allows null in a field and the database field allows null I get the error message: Cannot insert the value NULL into column 'IsSuccessful',...
Halvard
1

votes
1

answer
675

Views

Scaffold MySQL table with composite primary key in Grails

package website class Translations { String content; /* Primary key consists of language_id and text_id */ static constraints = { content(); } } Everything is clear for tables with single primary keys. But I wonder how to handle with composite keys. Is it possible to scaffold those tables, using Gr...
Edward Ruchevits
1

votes
1

answer
185

Views

Why can't I access injected service from scaffolding template for controller?

I have a controller which looks like this: class CategoryController { static scaffold = true def messageSource def categoryService ... } I want to modify Controller template to use service when needed: class ${className}Controller { static allowedMethods = [save: 'POST', update: 'POST', delete: 'POS...
Roman
1

votes
1

answer
1.1k

Views

Couldn't generate scaffold for file upload

I tried to generate a view for file upload but the upload part was missing and the rest class members have view generated for them View Model namespace myapps.Models.ViewModels { public class UserPhotoUploadViewModel { public HttpPostedFile PhotoFile { get; set; } public Guid UserID { get; set; } }...
codingbiz
1

votes
2

answer
1.1k

Views

How to define form select values via model in Rails?

I created a simple model called Categories, which is connected to Platforms model. class Platform < ActiveRecord::Base attr_accessible :name, :url, :country, :categories belongs_to :category end and class Category < ActiveRecord::Base attr_accessible :name has_many :platforms end I also successfull...
Cninroh
1

votes
1

answer
305

Views

How to use a .ps1 t4scaffolding template to Add Projects to the current solution?

Environment: Visual studio 2012, MvcScaffolding I'm new to MvcScaffolding and Powershell but what I'm trying to accomplish is to add a new Project to the solution of the current project. So basically the user has 1 solution, and 1 project in that solution, runs a scaffolding command and it generates...
james
1

votes
2

answer
104

Views

Is that possible to add destroy action into _form.html.erb instead of index.html.erb

If I do scaffold, it automatically makes destroy action in index.html.erb. What if I want to move this action to _form.html.erb? And I'd like to make it appear only during edit mode(example.com/books/1212/edit) not during new mode(example.com/books/new)
HUSTEN
1

votes
3

answer
1.1k

Views

How to create register and user profile page using scaffold or columns

I am new to Rails, and I want to make sure I start off on the right foot. So I need some clarification. My required register fields will be Username, Email, Password, Birthday, Zip Code. So I will be running 'rails generate scaffold User name:string email:string, birthday:string zip code:string'. I...
Cornelius Wilson

View additional questions