You need to use entity framework core with .net 5. Entity framework core does not support edmx but you can still create the classes for an existing database.
https://learn.microsoft.com/en-us/ef/core/managing-schemas/scaffolding?tabs=dotnet-core-cli
https://www.syncfusion.com/succinctly-free-ebooks/entity-frame-work-core-succinctly