I have a custom model binder that either returns the complete object or a null. This custom model binder is operating on a list so in my controller I get a list of either a complete object or a null.
Is there any way to get rid of the nulls in the list before the binded object reaches the controller?
Can I create a custom model binder for lists of specific type which filter out the nulls?
You could use a linq expression with the original list to make sure the elements don't contain nulls.
Before executing this command, check that list is not null.