I want to db.Set to query different tables dynamically. I have many entity models such as User, Invoice, Address or Product classes. How can I parse string "User" to become a class then db.Set? which can be set dynamically.
I have tried:
if (s=="User")
db.Set<User>...
else if (s=="Invoice")
db.Set<Invoice>...
.. above and so on...
Any solutions that make it simple as db.Set< s >? It means "s" can directly string to its Class.