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

2
answers

Return an object coming from two or more tables the fields

I have done some posts about rest and lambda, and to give an end to this subject (hopefully), I have a question. A colleague here on the site recommended that I create a DTO and bring the database data based on this DTO class and not directly fr...
asked by 27.08.2017 / 23:27
1
answer

Doubt with service rest and with put verb

I need only do an update on two fields of my model. In the get I pass a DTO to my App. The question is: When I go to do my update (verb put) do I need to load all the property or just the one I'm going to upgrade? Like this: [Route("atualiza/{...
asked by 14.09.2017 / 14:57
1
answer

EF Core Complex Object Insertion with WebAPI

I'm developing a WebAPI (.NET) application with EntityFramework Core. I have implemented the following entities: Pais.cs public class Pais { [Key] public int Id { get; set; } [MaxLength(100), Required] public string Descri...
asked by 29.06.2017 / 15:10
1
answer

Doubt verb GET WebApi

I currently have some compositions in my model that relate to other tables in my bank. When I set up get to bring me all the related data, I had several problems and doubts and when I could solve it, I do not know if it's the right one. Wh...
asked by 26.03.2017 / 21:01
1
answer

How to test the Restful API?

Hello, I'm practicing and the boy created an AP and told me to do the http methods of post, delete and etc ... I would like to know if it is correct what I did and the code of it, and how I do it for the test it. config.js //qualidade //va...
asked by 07.04.2017 / 15:34
1
answer

ASP.NET Web API post byte []

I'm creating a Web API and my model has a byte[] property, however whenever I try to Post my model arrives null, taking the byte[] property it normally arrives at the model . [Table("Pessoas")] public class Pessoa : ITab...
asked by 13.05.2017 / 22:00
1
answer

Difference between WebApi and SPA

I know that SPA is nothing more than a specific WebApi , but the question is: How do I differentiate one from the other, ie, what is the purpose of each in the development world. Why would I develop a SPA instead of a WebA...
asked by 24.05.2017 / 18:57
1
answer

Error: The request entity's media type 'multipart / form-data' is not supported for this resource

I'm trying to do a POST in a WebApi that is returning me the following error:    The request entity's media type 'multipart / form-data' is not supported for this resource.       ExceptionMessage: No MediaTypeFormatter is available to read...
asked by 04.01.2017 / 03:50
2
answers

I can not give POST with WebAPI

I'm studying WebAPI and using Postman to test. By doing some tests I realized that nothing comes when I send json using Postman for WebAPI. I searched a lot about POST using WebAP, but I do not know why it's not working ... Follow the Control...
asked by 13.07.2016 / 01:21
2
answers

I can not capture the post via webapi c #

Good morning. I am already trying a few days trying to capture a POST made in JavaScript by webapi c # and the most I can get is webapi telling me that the expected parameter is NULL. var objFornecedor = { ID_FORNECEDOR: 38,...
asked by 03.11.2015 / 12:35