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 and does noticeably better than MVC Controllers in synthetic 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)
11 Convenient business logic validation & error responses
2 Auto discovery & registration of endpoints
12 Easy access to environment & configuration settings
3 Attribute-free endpoint definitions (no attribute argument type restrictions)
13 API versioning
4 Secure by default & supports most auth providers
14 Built-in support for JWT Bearer auth scheme
5 Supports policy/permission/role/claim based security
15 In-process pub/sub event notifications (with auto discovery)
6 Declarative security policy building (within each endpoint)
16 Easy Server-Sent-Events for real-time data streaming
7 Supports any IOC container compatible with ASP.NET
17 Convenient integration testing (route-less & strongly-typed)
8 Constructor & property injection of endpoint dependencies
18 Easy model binding from route/query/json body/claims/forms/headers
9 Supports swagger/serilog/etc.
19 Easy file handling (multipart/form-data)
10 Model validation with FluentValidation rules
20 And anything else the Minimal APIs can do...
Made Possible By
Our Community Of Code Heroes 44
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
gordysc
boedlen
ApocDev
cwhellams
ramin-guliyev
nhart12
av0
paulczy
ridvandev
© FastEndpoints 2024