ASP.NET Minimal APIs Made Easy...

FastEndpoints is a developer friendly alternative to Minimal APIs & MVC

It nudges you towards the REPR Design Pattern (Request-Endpoint-Response) for convenient & maintainable endpoint creation with virtually no boilerplate.

Performance is on par with Minimal APIs. It's faster, uses less memory and does around 35k more requests per second than a MVC Controller in our benchmarks.

public class MyRequest 
{
	public string FirstName { get; set; }
	public string LastName { get; set; } 
}
public class MyResponse 
{
	public string FullName { get; set; }
	public string Message { get; set; } 
}
public class MyEndpoint : Endpoint<MyRequest, MyResponse>
{
		public override void Configure()
		{
				Post("/hello/world");
				AllowAnonymous();
		}

		public override async Task HandleAsync(MyRequest r, CancellationToken c)
		{
				await SendAsync(new()
				{
						FullName = $"{r.FirstName} {r.LastName}",
						Message = "Welcome to FastEndpoints..."				
				});
		}
}
Funded By The Community
Meet Our Sponsors
EKBY'S
VeeFriends
JetBrains
Hungry Minds
If you find FastEndpoints useful, please consider becoming a sponsor either individually, anonymously or through your company. There are a few different tiers of sponsorship with and without perks. Cancel anytime and choose the freqency/amount you'd like to contribute. Please visit our Open Collective page to become a sponsor.
Rapid Development
With These Handy Features & More
1 Define endpoints in multiple class files (even in deeply nested folders)
14 Convenient business logic validation & error responses
2 Auto discovery & registration of endpoints
15 Easy access to environment & configuration settings
3 Attribute-free endpoint definitions (no attribute argument type restrictions)
16 API versioning
4 Secure by default & supports most auth providers
17 Rate limiting
5 Built-in support for JWT Bearer auth scheme
18 Response caching
6 Supports policy/permission/role/claim based security
19 In-process pub/sub event notifications (with auto discovery)
7 Declarative security policy building (within each endpoint)
20 Easy Server-Sent-Events for real-time data streaming
8 Supports any IOC container compatible with ASP.NET
21 Convenient integration testing (route-less & strongly-typed)
9 Constructor & property injection of endpoint dependencies
22 Built-in uncaught exception handler
10 Easy model binding from route/query/json body/claims/forms/headers
23 Supports swagger/serilog/etc.
11 Json source generator support for request/response dtos
24 Visual studio extension (vsix) for easy vertical slice feature scaffolding
12 Easy file handling (multipart/form-data)
25 Plays well with the asp.net middleware pipeline
13 Model validation with FluentValidation rules
26 And anything else the Minimal APIs can do...
Made Possible By
Our Community Of Code Heroes 43
dj-nitehawk
KateyBee
CerealKiller97
vpetrusevici
visualbam
nefarius
hoppel
wjax
mehdihadeli
MichaelHochriegl
WahidBitar
vipwan
emrekara37
vzakanj
rudiv
Gruffydd-ap-Llywelyn
IeuanWalker
LoremFooBar
alexalok
Spylak
delasource
CoryCharlton
xxAtrain223
stefandevo
bobbyangers
OFark
Maskoe
Lenny32
kylelaverty
JustMaier
AFract
guerra08
danihengeveld
MrBogomips
jacokok
boedlen
ApocDev
cwhellams
ramin-guliyev
WojciechNagorski
vfrz
ekspedycja
timbze
© FastEndpoints 2024