It seems the only way to get the Global Request Filter to trigger when using the AutoQuery Admin interface is to have that property as part of the actual class as stored in the database. I’m trying to use the following to use a “virtual” property (EnvironmentId) just to change the connection at run time based on the value, but it’s throwing an exception because this property doesn’t actually exist in the table and is not showing up in the filter selector in the Admin interface:
[Route("/entities", "GET")]
public class Entities : QueryDb<Entity>, IForEnvironment
{
public Guid EnvironmentId { get; set; }
}
The above works just fine with Swagger, but not the AutoQuery Admin interface. To get the filter to trigger I need to have EnvironmentId as part of Entity, but I don’t want that in the table. The Swagger Plugin doesn’t seem to be bothered by this.
Is there anyway to get this to work?