I am writting a function that takes a parameter and that parameter requires a Type of TEntity. I want to be able to pass it a specific Type during runtime but I am having trouble getting it to compile:
public LoadOperation LoadQuery(EntityQuery<???> query)
{
LoadOperation loadOperation = DomainContext.Load(query,LoadBehavior.MergeIntoCurrent, false);
return loadOperation;
}
The code that wont compile looks like this:
EntityQuery<Person> q = DomainContext.GetPerson();
LoadQuery(q);
I have tried different things to make this work but am at a loss. What do I need to do?