Usually, the SQL table name in LINQ to SQL is statically provided by declaring the TableAttribute on an entity class. In my application, I want the table name to be dynamic: While admins use the normal table, if a non-admin user uses the same class, I want LINQ to use a view instead of a table. The view only contains the records which the user is allowed to see. How do I achieve this? An alternative to a "dynamic" table name would be to automatically insert certain Where predicates whenever a query
Read More...