Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
It's a fairly common pattern for strongly typed compiled frameworks.
The major differences will be
- composition is done via DI
- the route data is usually done via attributes, but can also be done as a config object in startup
The docs are pretty solid as is. Check the steps on the rest API section here:
https://docs.microsoft.com/en-us/... -
haven't build such an API with .net myself but I am fairly sure that openapi can actually generate the C# server for you, if that's an option for you to consider
-
@LotsOfCaffeine
It can generate the class stubs. It won't set up the kestrel server config correctly. -
@SortOfTested Ah got it, I haven't had the chance to make an actual API like that.
But in my area that's not always the technology of choice -
Like SortOfTested said, the docs are pretty solid. dotnet lends itself to a really great structure and toolsets for building apis, what exactly from the generated project confuses you?
I would say this, it is not only worth learning the C# syntax (assuming you won't use other .net languages) but also getting good with design patterns in c#
c# really is a great language and .net about the most pleasant "it just works" framework i have encountered if you take the time to go through the proper docs. Have fun!
Related Rants
-
fundor33313Client "Can you change your API? If a POST return 201 ours system crashes reading it" Me "Your system WHAT????...
-
bingumadness6The CEO at the company I work at has been telling our partners that our PIA is ready. It took me a week to fig...
-
Kidjenius29REST clients today can use upwards to 1000MB of memory. This leads to a poor experience for people who don't h...
I want to build my own REST NET API, I am familiar with C#. And I was working with Flask, Django and Express.js
The whole webapi structure of dotnet project seems to me a bit strange. Do you have any favourite resources that helped you to get into dotnet?
question
rest api
dotnet
web api