I have an Interface using the Entity Framework 6 as part of the project with a method such as
IEnumerable<Customer> Get;
Now I would like to introduce a sort feature. I'm aware I can have another parameter such as Sort=false and the class that implements the above method can use that to sort Asc/Desc by a column name I provide, however for each class I would have to enter the column name manually.
Is there a way I can have the Get function to accept a non mandatory parameter that allows the ability to select a column based on the table/view that is being targeted? So this way the class sorts by the column name that is within the table dynamically?