Just learning ASP.NET Core now and in some guides I see app.UseEndpoints() method.

But when I created my ASP NET CORE Project I've only seen app.Run in StartUp.cs

1. So Need I install some utilities for this or UseEndPoints was removed?
2. How Can I realize this method
 `app.UseEndpoints(endpoints => { endpoints.MapHub<ChatHub>("/chat"); });`