Skip to content

A sample .NET 7 Minimal API app that shows the basics of using Routing. It shows how to use URL, Methods and Binding to handle request and offer a simple way to organize the project's code

License

Notifications You must be signed in to change notification settings

fadihania/MinimalApiRouting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal API Routing

A sample .NET 7 Minimal API app that shows the basics of using Routing. It shows how to use URL, Methods and Binding to handle request and offer a simple way to organize the project's code. (It's missing validation and error handling)

Check commits for steps and how to apply different concepts

  • Routing (URL/Method)

  • Parameter binding:

    • Route (URL)
    • Body
    • Query
    • Services
    • Headers
  • Use C# attribute to specify binding:

    • [FromRoute]
    • [FromBody]
    • [FromQuery]
    • [FromServices]
    • [FromHeader]
  • Classes

    • Fields
    • Properties
    • Methods/lambda expressions
  • Value and reference types

  • Records

About

A sample .NET 7 Minimal API app that shows the basics of using Routing. It shows how to use URL, Methods and Binding to handle request and offer a simple way to organize the project's code

Topics

Resources

License

Stars

Watchers

Forks

Languages