Questions tagged as 'asp.net-core'

1
answer

genericsT Dependency Injection

Good morning, friends. I ran into a difficulty and I can not get past it. I have 2 projects, a webapi and a standard class, both in dot net core. In my standard project, I'm working with Repository to abstract CRUD in mongoDB. Follow th...
asked by 19.10.2017 / 14:43
1
answer

How to use DTO in ASP.NET CORE + DDD

I'm building an application following the DDD standards. I would like to know how to correctly use the default Data Transfer Object - DTO. With the little I read, I came to the conclusion: I'm using ViewModel (a representation of the entity t...
asked by 24.04.2018 / 22:54
1
answer

How to deploy an Asp.Net Core Web API project in IIS?

Hello, I'm trying to put my ASP.NET WEB API application in IIS on the Windows Server 2016 server, but without success. When accessing url ex: link returns this error:    HTTP Error 502.5 - Process Failure. The process I've done so f...
asked by 15.09.2017 / 20:53
1
answer

Crypto of url

I have a SendEmail method which generates a link through HTTP request, which will send to the user's email for exchange. However for tests I fixed the user ID in this URL, but for security reasons I have to encrypt it. How do I do this? Fol...
asked by 26.01.2018 / 17:23
2
answers

How can I do to get the insert in the log with logged in user? Identity - Asp.net core 2.0

I need to get the user logged in, to do an insert in the log, thus including which user included in the table, made change, and delete. I'm learning language, and I still have a lot of questions. This is my AccountController controller: pri...
asked by 10.07.2018 / 16:50
2
answers

How to pass a parameter from one Action to another Action on the same Controller

I need to send a parameter of an action to another action on the same controller, but the parameter is "zeroed". How can I do this? Below the code I'm doing: [Authorize] public class ItemMaloteController : Controller { public IActionResult...
asked by 19.11.2018 / 04:59
1
answer

What is an Over-posting attack?

I came across the term Over- posting while following Microsoft's guide to creating applications in ASP.NET Core. I had a question regarding the use of attributes in the signature of a method, which in this case, was the Bind attribute fo...
asked by 15.11.2017 / 22:58
1
answer

Include in the Entity Framework from an Enumerable

I have the following entities: public class Rota { public Rota() { CidadesRotas = new List<CidadesRota>(); } public int RotaId { get; set; } public string Descricao { get; set; } public string Observacao {...
asked by 23.08.2018 / 21:20
2
answers

Update page ajax mvc core

I need to close a modal, and refresh the page, I'm doing it this way: function closeModal() { $('#myModal').modal('hide'); location.reload(); } But the first time it does not work, and then it works normal, does anyone...
asked by 04.06.2018 / 21:53
1
answer

Physical and Legal Person on the same table

Could you help me please? I am developing a client crud, where I will leave legal and physical person in the same table, but in the case when the user chooses the type of person through a radio button, I will show and hide some fields through...
asked by 18.09.2018 / 19:34