Improve performance by excluding multiple conditions and List
I think the assignment of your entities (bad name) is uber-abusing ternary expressions.

That said, my first thought was why on Earth would you want to return an Exception? So I googled up a bit and found this:


  Is it valid for a function to return exception objects?
  
  Absolutely. Here is a short list of examples where this may be appropriate:
  
  
  An exception factory.
  A context object that reports if there was a previous error as a ready to use exception.
  A function that keeps a previously caught exception.
  A third-party API that creates an exception of an inner type.
  


Fine then. But there's a flaw in your API - you're taking in an Object for what seems to be an Entity.

If I understand what you're trying to do here, I believe you'd be better off with an overloaded method:

protected override Exception GetValidationException(int value, string name)
protected override Exception GetValidationException(Guid value, string name)
protected override Exception GetValidationException(int[] value, string name)
protected override Exception GetValidationException(Entity value, string name)
protected override Exception GetValidationException(Entity[] value, string name)


...Or I'd find a way to make something like this work:

protected override Exception GetValidationException&lt;TValue&gt;(TValue value, string name)