Implement endpoints in more flexible way.

Fix: re-implement `UserEndpoint` as static style which works best with minimal API, simplify the DI framework.

Fix: remove no needed service register in main program.
This commit is contained in:
2025-07-07 16:01:39 +08:00
parent 39b28386ae
commit dd5d556963
2 changed files with 7 additions and 18 deletions

View File

@ -107,9 +107,6 @@ static class ExtensionMethods
{
// Application services
builder.Services.AddScoped<IUserService, UserService>();
// WebAPI Endpoint services
builder.Services.AddScoped<UserEndpoint>();
}
/// <summary>