I have a requirement to showing all or less properties of an entity in the grid based on the page mode user select. For example I have three page modes
Minimal (will show 8 properties of an entity in the grid)
Standard (will show 12 properties of an entity in the grid)
Extended (will show 15 properties of an entity in the grid)
How can I make Select predicate dynamic to include the specified no of columns of an entity based on user page mode. Lets say I have Entity company with 15 properties I want to do something like this
dbContext.Companies.Select([predicate for choosing different no of columns?])