Questions tagged as 'mvc'

2
answers

No parameterless constructor defined for this object

I'm trying to create a parameterized constructor, as shown below: public class TestController : Controller { private readonly IAppService _servico; public DashboardController(IAppService servico) { _servico = servico;...
asked by 12.09.2018 / 15:53
1
answer

MVC project in C # throwing Exception System.InvalidCastExecption

Dear colleagues, I am trying to learn to develop a project in MVC. But I'm having some difficulties. When executing the program, it executes normally, however when I want to record a product entry note it throws this exception according to the i...
asked by 17.07.2018 / 15:35
1
answer

How do I display all the columns in my BD asp.net mvc

I wanted to know how to loop to print the columns of my grid with the values of the database, but it only showed 1 result even the database being huge, here is the code, thanks for the help CONTROLLER: using System.Collections.Generic; usin...
asked by 09.05.2018 / 19:03
2
answers

DropDownListFor with ViewBag and Dictonary returning null value

I would like everyone's help to help with the following problem: Theerrorhappenswhenheisstilldoingthefieldvalidations.Controller:publicActionResultCreate(){varvEmpresas=newDictionary<string,string>();vEmpresas.Add("Matriz", "Matriz");...
asked by 16.08.2018 / 21:55
1
answer

Txt displays duplicate information

What this application does: the user has to choose the right answer to the question. I just put a question for now. Once you have save the answer (this is within a .txt) it can see result . And here's the problem: by clicking on see resu...
asked by 29.12.2017 / 16:29
1
answer

CodeIngniter counting rows and displaying in View?

I want to count and display a database field. Database: nbkg Table: chamados Model: chamados_model.php <?php class dashboard_model extends CI_Model{ public function lista($chamados) {...
asked by 27.03.2017 / 13:14
1
answer

How to retrieve data coming from the model?

I'm using routing with DRouter and I always need to get the data from such a store by slug , for that I need make 1 select on all routes. But I do not know how to get the id , name and slug from there SystemModel.php and ther...
asked by 14.01.2017 / 15:24
1
answer

CSS and JS are not being applied to the project in Spring MVC (config via java)

I'm a beginner with SpringMVC and I'm learning through Spring MVC (Master the main Java web framework, by Alberto Souza, home code). Before starting with Spring, I created a Maven project and implemented the frontend and the persistence part...
asked by 01.06.2016 / 06:15
1
answer

Allocation of responsibilities in MVC

I'm starting work with MVC, more specifically with Laravel and Eloquent (the ORM built into Laravel). I studied and continued studying the MVC standard and its advantages. However, in practice, I was left with some doubts about where to alloc...
asked by 29.09.2014 / 22:46
1
answer

How to save the same object using the .net MVC entityFramework in the database?

I need to update to a table in the database using entityFramework, because when I update a value of a field and I send save, it gives error. Please someone have a way to solve this ?? grateful usuarioVM.ContatoUsuarios = ContatoUsuari...
asked by 13.01.2015 / 19:08