0

I have seen options for .NET 5, .NET Core 2.0, etc. but none of them seem to work for .NET Core 3.1

What is the best way to provide table name, in a variable, to a LINQ query? Feel free to provide a simple link, if you have one, but I haven't been able to find anything that works for .NET Core 3.1

Gert Arnold
  • 105,341
  • 31
  • 202
  • 291
rekay
  • 53
  • 1
  • 7
  • 3
    If you found an example in ,Net Core 2, it should work in 3.1. It helps to include code (and links to source articles) that you have already tried. – Steve Py Apr 21 '22 at 20:18
  • https://stackoverflow.com/questions/28099435/dynamic-table-name-in-linq https://stackoverflow.com/questions/39345855/dynamic-table-name-in-entity-framework https://stackoverflow.com/questions/31035238/dynamic-table-name-with-entity-framework – Power Mouse Apr 22 '22 at 13:08
  • Simple question, why you have to change table name and for which cases? – Svyatoslav Danyliv Apr 22 '22 at 14:25
  • @SvyatoslavDanyliv the method will handle SELECT actions against a database and I don't know at runtime what table the requestor will need data from. – rekay Apr 22 '22 at 15:11

0 Answers0