Otis wrote:
Depends on how you use the collection. If you store just one type in the collection (and the framework at the moment does that), you can use as Marcus explained and for example check the first entity.
You can also grab a PropertyInfo object for the property on the first entity, then in a try/catch clause call that property. If it's not there, you'll end in the catch clause and swallow the exception as the entity was apparently of a different type.
And I thought of doing something like that, except that I potentially (although it's unlikely) have an empty EntityCollection. Surely, since the EntityCollection has been created with an entity-specific factory, I should be able to tell the EntityType for the EntityCollection?