Message
 
 
To
12/01/2017 12:35:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01646521
Message ID:
01646623
Views:
27
>>>>>>>Hi,
>>>>>>>
>>>>>>>I have a source code of an Web API project created with API template in VS 2013. Someone else created this project.
>>>>>>>
>>>>>>>If I want to see the "flow" of classes/methods when a client calls an endpoint of this Web API (just as a way to learn more). Where (in which class and/or method) would I set the Debugger to stop, so that I can follow from this point? That is, what is the Startup class/method for typical Web API template project?
>>>>>>>
>>>>>>>TIA
>>>>>>
>>>>>>Dimitry has given an example of a controller using attribute routing (but the controller will be derived from the ApiController class not Controller).
>>>>>>
>>>>>>If the site uses convention based routing then there will be a RouteConfig.cs file in the App_Start folder. Inspecting this should allow you to work out which controller and method will be called for a specific url
>>>>>
>>>>>I use Controller and not ApiController and it works very well.
>>>>
>>>>Hmm. Controller is for System.Web.Mvc - the System.Web.Http.ApiController should be used with Web API - it's better suited to returning serialized data etc.
>>>
>>>Sorry Viv, I don't understand what you mean by "better suited to returning serialized data etc.". I use WebAPI with MVC, that is right and happy with it as much as one can be using .Net technologies. Actually, I am moving by API into Go for a much better experience (if better meant much faster, really works on multiple platforms etc:).
>>
>>Cetin, what is "Go"?
>
>It is an open source language from Google, version 1 released in 2009. It is cross platform (you can write and compile the same code into native executable from and\or for multiple operating systems). I was and still writing with VFP and C#, but trying to learn it also for sometime. It looks better than others to me. You can check here and also try online without installing anything (UT also has a Go section since yesterday):
>
>https://golang.org
>
>(Dropbox, docker ... all built with Go)

Thank you. I will look at it on a slow day.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View