I would like to Invoke this method:
public IEnumerable<TEntity> SelectAll(params string[] entitiesToLoad)
But at the most of times I will not load relational entities, so I'd like to invoke it without send entitiesToLoad values, like this:
var dbResult = methodInfo.Invoke(repository, null);
But it throws an exception, because the number of parameter is not equivalent.
Is there a way to perform this without change the params string[] to another type of parameter?
I tried string entitiesToLoad = null as parameter
, I got the same error.