Lets suppose that I have a db table with name Employee and a respective EF 6.0 db-first model.
Getting all rows of table Employee is done through q
You must create a new dbcontext that inherits from the db-first model context and treat it like code-first in ef. Check the link, please. Same problem as yours.
https://www.codeproject.com/Articles/421643/How-to-Use-MVC-Net-on-the-Dynamics-NAV-Database-St#_articleTop
So when mapping, you can get the table name dynamically.