Questions tagged as 'asp.net-mvc'

2
answers

Is it possible to change databases in an existing system?

I'm starting a project in ASP.NET MVC 5 with Entity Framework for a client, where it chose to use a free database, strong> MySQL . But with the growth of the application, I foresee the best use of a database like SQL Server . My suggesti...
asked by 05.09.2014 / 16:03
1
answer

How do I maintain a ViewBag for all Controllers?

I'm developing on ASPNET MVC 4 with Razor. I made the login page and everything is ok. After the login, the famous phrase "Welcome FLAVIO" is being successfully returned, via ViewBag. As I'm doing a redirect, then I'm doing this in Acti...
asked by 19.09.2014 / 00:22
1
answer

How to implement a LOG of updates with ASP.NET MVC?

I would like ideas on how to implement a generic update LOG in DB (Entity Framework 6+) that would allow me to discover information such as: System user X on date Y changed name and date of birth (from, to) in the customer registry. I think i...
asked by 16.06.2014 / 14:03
2
answers

Why when I delete or edit table record x is also removed from table y?

I have a system in ASP MVC with C # entity . I have the table Pedidos and Agenda . In the agenda table I have a column with id of the request. When the request is canceled, I have to remove from the...
asked by 04.11.2016 / 15:29
1
answer

Write date of inclusion using entity framework

I believe there has been a misinterpretation, I am posting the code to be better understood. I'm using a project for my EF Repository inside it I have: Notice the doubt in //CompanySave.DATA_IND = DateTime.Now; This is possible. using Syste...
asked by 17.09.2015 / 03:06
2
answers

Cross-origin request blocked

Hello, I'm trying to load a page from another application inside a div from my application using the jQuery load but my application is not loading the page and it shows the following error message: Cross-origin request blocked: Same Origin Pol...
asked by 07.08.2015 / 17:06
2
answers

Complex type Bind with AngularJS

I'm studying AngularJS and Asp.net MVC and I was not able to bind a Person's CPF property when I perform a POST: Person Class: public class Pessoa { protected PessoaFisica() { } public Int32 PessoaFisicaID{ get; set; } public St...
asked by 22.12.2015 / 02:10
2
answers

SELECT 3 different tables using DAPPER?

First of all I would like to say that I am a beginner in programming, and I am developing my first project. Using ASP.NET MVC Technology. I need to query in 3 different tables: User, Country and State with the following fields User: User...
asked by 14.02.2016 / 21:08
2
answers

Receive int nullable in Razor (@ Html.TextboxFor)

I have a Carro object and I have an integer and nullable property called AnoInspecao . When creating, I can create a car object with the null inspection year (without typing anything) and persist in the database normally. var carro = ne...
asked by 03.12.2015 / 18:44
5
answers

localhost does not have access to the requested page

I'm trying to access a URL in AJAX but is giving the following error:    XMLHttpRequest can not load link . At the   'Access-Control-Allow-Origin' header is present on the requested   resource. Origin ' link ' is therefore not...
asked by 15.12.2015 / 12:18