3
detrin
4y

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?

Comments
  • 2
    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/...
  • 0
    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
  • 0
    @LotsOfCaffeine
    It can generate the class stubs. It won't set up the kestrel server config correctly.
  • 0
    @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
  • 0
    @SortOfTested Thank you, that looks solid
  • 0
    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!
Add Comment