{"repo":"marcominerva/MinimalHelpers","free":true,"listed":false,"github":"https://github.com/marcominerva/MinimalHelpers","clone":"git clone https://github.com/marcominerva/MinimalHelpers.git","description":"A collection of helpers libraries for Minimal API projects.","language":"C#","stars":141,"topics":["aspnetcore","minimalapi","minimalapis","minimal-api","hacktoberfest","net","routing","openapi","swagger","csharp"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Minimal APIs Helpers A collection of helper libraries for Minimal API projects. MinimalHelpers.Routing A library that provides routing helpers for Minimal API projects, enabling automatic endpoint registration using reflection. Installation The library is available on NuGet. Search for MinimalHelpers.Routing in the Package Manager GUI or run the following command in the .NET CLI : Usage Create a class to hold your route handler registrations and have it implement the IEndpointRouteHandlerBuilder interface: Call the MapEndpoints() extension method on the WebApplication object in Program.cs before invoking the Run() method: By default, MapEndpoints() will scan the calling Assembly to search for classes that implement the IEndpointRouteHandlerBuilder interface. If your route handlers are defined in another Assembly, you have two alternatives: - Use the MapEndpoints() overload that takes the Assembly to scan as argument - Use the MapEndpointsFromAssemblyContaining () extension method and specify a type that is contained in the Assembly you want to scan You can also explicitly decide which types (among those that implement the IEndpointRouteHandlerBuilder interface) you actually want to map, passing a predicate to the MapEndpoints method: Note These methods rely on Reflection to scan the Assembly and find the classes that implement the IEndpointRouteHandlerBuilder interface. This can have a performance impact, especially in large projects. If you have performance issues, consider ","default_branch":null,"files":null,"tree":[],"storefront":"/r/marcominerva","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/marcominerva/MinimalHelpers/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}