1.报错 Cannot modify ServiceCollection after application is built

原因: 依赖注入放的位置不对 

builder.Services.AddScoped<>();

var app = builder.Build();