https://github.com/zhaytam/aspnetcore.lightweightapi
A lightweight & performant framework for APIs (endpoints), built on top ASP.NET Core (boilerplate)
https://github.com/zhaytam/aspnetcore.lightweightapi
Last synced: about 1 year ago
JSON representation
A lightweight & performant framework for APIs (endpoints), built on top ASP.NET Core (boilerplate)
- Host: GitHub
- URL: https://github.com/zhaytam/aspnetcore.lightweightapi
- Owner: zHaytam
- License: mit
- Created: 2020-11-29T16:03:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-07T12:45:12.000Z (over 5 years ago)
- Last Synced: 2025-02-12T15:53:13.466Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 36.1 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AspNetCore.LightweightApi
A lightweight & performant framework for APIs, built on top ASP.NET Core (boilerplate)
## Example
```cs
[Endpoint("/users/{id}", Method = EndpointMethod.Patch)]
public class UpdateUserHandler : IEndpointHandler.IWithRequest
{
public Task Handle(UpdateUserDto request, HttpContext context)
{
var id = context.Request.RouteValues.Get("id");
// Update in db
return Task.CompletedTask;
}
}
public record UpdateUserDto(string Username, string Email);
```