Questions tagged as 'asp.net-mvc'

1
answer

Correct view creation in MVC using Ajax

I have a page that maintains a budget. Below I present a briefing of entities public partial class Orcamento { public int IdPedidoCompra { get; set; } public int IdCliente { get; set; } public System.DateTime DataPedido { get;...
asked by 23.06.2015 / 21:58
3
answers

Delete record from link using Entity Framework

Good morning. I'm working with Entity Framework and I'm having trouble updating a relational table. For example, I have a product with several categories, in the edition I unlink the category x of the product. The update does not delete the unre...
asked by 25.06.2015 / 15:06
1
answer

Ajax function for MVC controller

I have this function with array and I am not able to pass to the controller values, I listing, it appears correctly, I use angular. $scope.addItem = function (user) { $scope.items.push({ de: $scope.total,...
asked by 06.06.2018 / 20:43
2
answers

Authentication in RESTFul service

In the example below, I need to pass a login / password pair because the REST service requires Basic Authentication. So how do I pass this information in the following section? (Additional information: authentication must be made encoded in t...
asked by 08.09.2014 / 21:08
1
answer

Redirect to external URL with basic authentication in MVC

I am developing a portal in C # MVC3 and in a given operation I need to open another window in a separate window. To open the page of this new portal I need to send some credentials, since it is implemented with basic authentication. I'd like...
asked by 31.03.2014 / 13:11
2
answers

Extend a specific jQuery method in ASP.NET MVC jquery.unobtrusive-ajax.js

I'm using the extensions methods @Ajax.BeginForm() to save the data via AJAX. To prevent more than one click on the submit button, which could cause a double insert in my database, I decided to include a small snippet of code inside the...
asked by 10.03.2014 / 20:19
2
answers

EntityFramework AspNet Core migrations

Good evening, I came across a problem updating the DB of an AspNet Core application. I had created the database, but I ended up deleting it now when trying to create it again using the following commands: dotnet ef migrations Initial dotnet e...
asked by 17.02.2017 / 02:00
1
answer

How do I make my form work with reCAPTCHA?

I'm saving the data for Ajax, but my reCaptcha is not working properly, the form is sent even without pressing inside Captcha. My Controller [HttpPost] [CaptchaValidator(PrivateKey= "secretKey", ErrorMessage="Captcha Invalido", Req...
asked by 18.09.2018 / 01:05
0
answers

How to map two LIST properties using Automapper

RegisterNewPessoaCommand Class public class RegisterNewPessoaCommand { public RegisterNewPessoaCommand(PessoaNatureza pessoaNatureza, PessoaFisica pessoaFisica, PessoaJuridi...
asked by 11.09.2018 / 03:11
1
answer

How to delete objects from a list?

I have the following code: using (Context contexto = new Context()) { List<Cliente> listCliente = contexto.Cliente.Where(x => x.Status == 0).ToList(); } How do I delete this result from the database? Remembering that I have num...
asked by 13.06.2017 / 15:03