Replaced EntityCollection.isEmpty with Count
Added EntityExtension and EntityRepositoryExtension