private static NewCustomerCheckContext GetContext()
        {
            using (var scope = Program.host.Services.CreateScope())
            {
                var services = scope.ServiceProvider;
                //获取context
                var context = services.GetRequiredService<NewCustomerCheckContext>();
                return context;
            }
        }

评论

想当第一个评论家吗?

提交评论