Questions tagged as 'asp.net-web-api'

0
answers

Entity mapping with .Net Core 2

I have the following entities: public class Transacao : IEntity { [Key] public int Id { get; private set; } public int LojaId { get; set; } public virtual Loja Loja { get; set; } public int Adquir...
asked by 02.06.2018 / 00:26
1
answer

Delete Oracle - Api Web

I'm trying to make this springboot code, turn a code into WebApi @RequestMapping("/deletarEvento") public String deletarEvento(long codigo) { Evento evento = er.findByCodigo(codigo); er.delete(evento); return "redir...
asked by 26.05.2018 / 19:19
0
answers

Generate report through the Web API for C #

I am starting the report part of my system, when making a request to generate a report on a new tab I can even do it by link passing a few parameters. window.open(this.httpUtil.url('SinistroReports/' + search.DateStart +'/' + search.DateEnd +'...
asked by 02.05.2018 / 19:14
1
answer

Object as parameters for C # API

I have a request made in Angular for C #. However I do not know how to receive the data in My API In C #. getWithFilters(filter: any) { let parametros: any = { razaoSocial: filter.razaoSocial, cnpj: filter.cnpjcpf,...
asked by 02.05.2018 / 22:02
0
answers

Validate user token of multiple applications in a single OAuth2-based authentication WebAPI

I am in the following scenario: I developed an API that is only used for authentication and authorization of company users, which I am calling SecurityAPI. All services work as expected and the API is based on OAuth2. In the company I have...
asked by 27.03.2018 / 15:33
2
answers

Api that receives an Array of items

I have the following situation, I need to create an API that will receive the content below: { "numeroCarrinho": 122865, "itens": { "PA00058": 1, "MA00068": 1, "PA00004": 1 }, "cep": "41706670", "retiraNoLocal": false }...
asked by 06.12.2017 / 20:01
1
answer

Error sending a route to the same api / Controller / Action in a WebApi

I'm having the following error, I perform the following operation: // POST: api/Funcionario/AddFuncionario [HttpPost("AddFuncionario")] public IActionResult AddFuncionario([FromBody] Funcionario Func) { if(Func == n...
asked by 13.11.2017 / 16:14
0
answers

Problem uploading Api web in Asp.net core using entity framework with postgresql

Hello! So I've mapped my classes to the bank, mirrored successfully, and started to build the features of my webservice. With this, I came across the following error:   InvalidOperationException: Unable to resolve service for type 'CadFuncionari...
asked by 13.11.2017 / 01:35
1
answer

When executing POST passing object via URI of a WebAPI, the object arrives as null in the method

I have a few days of headaches with this problem I have an MVC5 fronted application and it sends an object to another WebAPI application in a Save () method. See the code of my Frontend application that sends the object to the WebAPI public...
asked by 16.09.2017 / 19:52
0
answers

Route is not being located on my site, but works on localhost

I have a service, with GET and PUT verbs. In localhost is ok, but when I host on my site I get this error, only when I call PUT :    IIS 7.5 Detailed Error - 404.6 - Not Found According to the provider's faces, this may be the route...
asked by 18.09.2017 / 13:59