I have a database where I have a table that will have columns added/removed by the customer (We can't change this behavior, it's legacy).
This table has a foreign key to a table that I've mapped through EF. I'm trying to figure out a way to sort/filter the parent table by one of the dynamic columns using EF.
Is there anyway to add to the query for a column that doesn't exist until runtime?
My current solution is to get all the records, then get the corresponding records in the other (dynamic)table as a dataset, and combine the two in a new class, and sort a list of those objects.
Unfortunately, I have no code to show for this as my already working solution isn't what I want, but I have no idea where to start with a better, optimal solution.