Asp.net Minimal API 的框架
Asp.net Minimal APi 的框架
一:Nancy
demo:
public class HelloModule : NancyModule{ public HelloModule() { Get["/"] = parameters => "Hello World"; } }
具体的使用示例:ASP.NET轻量级MVC框架Nancy使用_C#_强强的个人技术博客 (xqblog.top)
二:Carter
地址:https://github.com/CarterCommunity/Carter
demo:
app.MapGet("/", () => "There's no place like 127.0.0.1").RequireAuthorization();
三:MinimalAPI
demo:
var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); if (app.Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.MapGet("/", () => "Hello World!"); app.Run();