Questions tagged as 'mvc'

1
answer

DOMDocument :: loadHTML () Error

Well I have the following controller where I get the information of a twitter user by username using DOMDocument::loadHTML() public function info($user = false) { if ($user === false) { Url::redirect('get');...
asked by 24.08.2017 / 00:08
2
answers

DropDownListFor selected values do not persist

I'm using ASP.NET C # with mvc 4 and in my View I have a DropDownListFor, with a class I used from bootstrap-multiselect, as in the image: Andthecodeintheview:@Html.DropDownListFor(m => m.Estagios, (IEnumerable<SelectListItem>)Model...
asked by 02.08.2017 / 17:43
1
answer

How to map the results of a store procedure with an entity using Entity Framework?

Speak up. I'm doing a project with MVC 4 and EF6. I would call a proc and its results populate an entity. But my entity is not a database table, so I did not use Dbset on it. What happens is that this proc joins some tables. I am doing everyt...
asked by 21.06.2017 / 22:35
1
answer

Using Session in an MVC controller returns error

I'm trying to use a session in an MVC application, I believe you're right but you're returning the error:    Object reference not set to an instance of an object When it tries to pass the value in the session and the value is not null....
asked by 31.03.2017 / 19:07
1
answer

Working with Dates in JavaWeb

Hello, I'm doing a project that manages all the projects in my company, I'm using Hibernate, JavaWeb, primefaces, TDD and MVC standard . My entity is shaped like this for date variables: @Temporal(value = TemporalType.TIMESTAMP) @Colu...
asked by 22.09.2016 / 03:25
1
answer

Expand MVC structure and modularize by files?

I'm trying to understand the MVC pattern and I've created an example with CRUD of users (with login), but I'm not sure if it's the best way I've created it. Here are some pages and the download link for the project: index.ph...
asked by 11.03.2016 / 02:09
2
answers

Ajax request data with AngularJS is not arriving at the action method

I know this is very basic, but I'm starting now. I'm creating a neighborhood registry, using AngularJS, my backend is in C # with ASP.NET MVC. My method is called by view , but does not get JSON: This is my save method on BairroControlle...
asked by 23.12.2015 / 12:55
3
answers

Controller with repository, Ioc and DI

I'm trying to implement the recording of the data in my views, and I'm having doubts about how to instantiate my% repository% in my controller, even using dependency injection examples, because in builder of my user repository he expects to rece...
asked by 02.09.2015 / 21:58
1
answer

Can a Model use a WebService for "business rules"?

When using some ready-made frameworks (such as Laravel and CodeIgniter), I noticed that the Models are usually extended from other classes that usually connect directly to the database, so I understand this is not mandatory, since Model must con...
asked by 02.05.2015 / 04:36
1
answer

Session error in user-level validation

Well, I'm doing a simple dashboard with user level where I move to the session with an array of three values, so that's fine, the functions that validate the form, validate the user of the database, if the user is logged in or not, function that...
asked by 27.02.2015 / 19:23