i just created a new ..net core 3.1 WebAPI project based by the template and vs2019 , and I added code follow the official example in startup.cs like this
pub