Questions tagged as 'asp.net-mvc'

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

How to configure Api web route to accept query string?

I have a web api with the following method: [HttpGet] [Route("api/documento/doc/list?{cpf}")] public string Listar(string cpf) { return "value"; } I need the above method to be called through the url:    link The big pr...
asked by 15.02.2017 / 13:52
1
answer

Error opening Package Management Console

When I open Package Manage Console it gives me the following message:    Join-Path: Can not convert 'System.Object []' to the type 'System.String' required by parameter 'ChildPath'. Specified method is not supported.   C: \ Users \ ren...
asked by 19.12.2016 / 14:19
2
answers

How to know who called the screen

I have two List and Filter screens, both are redirected to a third screen called View List View button List : //ABRE TELA VISUALIZAR $(document).on('click', '.visualizar', function(e) { e.preventDefault; var pClienteID = $(this).a...
asked by 10.11.2016 / 23:38
1
answer

Search in MySQL database MVC

I have Search searching by name, but wanted to search for both name and place in the same search field. Follow the action: [HttpPost] public ActionResult Search(FormCollection fc, string searchString) { if...
asked by 08.10.2016 / 19:57
1
answer

Retrieve image via path and display

I created the following method to save an image to the database public ActionResult enviaArquivo(UsurioViewModel arq) { try { string nomeArquivo =""; if (arq.Arquivo != null && arq.Arquivo.ContentLe...
asked by 08.05.2017 / 03:06
1
answer

C # MVC - Error after publish in VS015. 404 Not Found

I did a "Publish" with VS2015 of type MVC Web, but in "Publish Method" I put "File System". The problem is that I published in IIS and runs the views, but when I click the buttons it does not find the methods. As if I had no Controller. What do...
asked by 12.05.2017 / 23:41
1
answer

Rollback transaction does not work as expected

I've recently been implementing a request sequence in Visual Basics, and would like to rollback when some fail. So I did the following: Public Class DAO Dim connection As New MysqlConnection Dim command As New MySqlCommand Dim dr A...
asked by 18.01.2017 / 19:55
1
answer

Error logging in using Facebook

Attempting to log in via facebook I come across with the following error:    Server Error in Application '/'.   Object reference not set to an instance of an object.   Description: An unhandled exception occurred during the execution of the  ...
asked by 23.01.2017 / 21:05
1
answer

Error generating excel file

When the system runs on the server this error occurs: ERROR: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT...
asked by 20.05.2016 / 17:54