none
Project type for consuming API? RRS feed

  • Question

  • Hello, 

    Looking for some advice on first C# project to consume an API, so please bear with. :-) 

    My code is written in "LINQPad 6" (Console Application) and all works fine.  I'm looking to transplant my code into a Visual Studio 2019 solution and wondered about the best project type for this.   Is MVC an option?  

    The published/deployed code will need to run in an Azure so at this stage and I'm considering the following: 

    • .net framework console application deployed as a WebApp/WebJob.  

    I took the Postman JSON output and pasted into https://app.quicktype.io/#l=cs&r=json2csharp to get my classes, apart from ParseStringConverter not being recognized 

    [JsonConverter(typeof(ParseStringConverter))]

    all the rest seem to map nicely, is this a good way of getting classes from JSON? 

    Thanks in advance. 

     



    Wednesday, March 4, 2020 7:16 PM

All replies

  • The links should help you

    https://www.tutorialspoint.com/asp.net_mvc/asp.net_mvc_web_api.htm

    https://www.tutorialsteacher.com/webapi/consuming-web-api-in-dotnet-using-httpclient

    ASP.NET MVC WebAPI has a forum in ASP.NET forums.

    http://forums.asp.net/

    Wednesday, March 4, 2020 8:29 PM
  • Why did you move this to a forum nobody reads?  

    Wednesday, March 11, 2020 10:01 AM