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

1
answer

Asp.net web api From uri and From Body when using?

Asp.net web api for serving [FromBody] and [FromUri] and when there is a real need to use? example: public IHttpActionResult Get([FromUri] email) { } public IHttpActionResult Get([FromBody] email) { }     
asked by 21.01.2018 / 19:20
0
answers

How to change the ip address of the web api?

I'm doing a Xamarin application, this application is consuming a web API that is on my local computer, but I'm having trouble consuming it for Android. I changed the localhost address to the IP of my machine, but even on the erro 400...
asked by 18.01.2018 / 19:03
1
answer

Problems with FindSystemTimeZoneById in Web.API .NET Core in Docker (Linux)

Scenario: I'm migrating a WebAPI to .NET Core, in Windows it's running normally. Problem When I'm running on Docker (Linux) (docker-compose) I'm having the following problem:    "The time zone ID 'W. Europe Standard Time' was not...
asked by 30.12.2017 / 12:17
0
answers

Error generating table data

My front does not get the data to list. But the data is inserted perfectly. How to solve? <?php require_once 'vendor/autoload.php'; $app = new \Slim\Slim(); $db = new mysqli("localhost","root","","neppo"); $app->get("/cadastro",funct...
asked by 20.12.2017 / 17:35
0
answers

How to hide properties of an ASP.NET Core model entity only in JSON rendering?

I'm starting studies with ASP.NET core Web Api, and I'm implementing the User class, which has a Password property. Of course I do not want the password to be visible in aps JSONs. I have been researching a lot, I read about IgnoreDataMember,...
asked by 15.12.2017 / 19:28
2
answers

How to walk through a C # class?

I have DeserializeObject that fills a request class and items, in the items I need to go through this class to write the data, the way I'm doing is zeroing the records, how could I read the data? > public class Item { public string i...
asked by 13.12.2017 / 21:18
2
answers

I can not send email to my WebApi

I'm trying to create a function in my WebApi where I return information based on the email address that I send, the problem is that the ". break the route. In case I did my action like this: [AcceptVerbs("GET")] [Route("Usuarios/GetUsuari...
asked by 29.11.2017 / 22:39
1
answer

How do I mount a List or Ienumerable array on the Controller and step to View?

Good Night! I made a request to my webapi to fetch data in order to use it in a DropDownlist @Html.DropDownList("Id","Descricao") . In My controller, I can pull results from WebApi in collection, I have dealt with Json and I put it in my p...
asked by 15.11.2017 / 22:38
0
answers

Send information to rest and trigger notification

I'm in doubt about building a REST , not well in building, but which way to go, what approach. See my business. 1) The customer requests a discount. 2) Because the seller is not allowed to grant certain discount margins, he changes a fla...
asked by 09.11.2017 / 19:39
1
answer

Button in a View with MVC / Web API

When we put a button in a View, how do we trigger a click of it? I have this button: @model IEnumerable<CarregaDados.Models.Cliente> @{ ViewBag.Title = "Index"; } <h2>Index</h2> <p> @Html.ActionLink("Criar Usuá...
asked by 19.10.2017 / 16:25