$query = \Drupal::entityQuery('node');
$query->condition(DOMAIN_ACCESS_FIELD, 'domain_id'); // Set the domain id hear
$query->condition('type', 'article');
$query->condition('status', 1);
This is a full Example of the Entity 'Vehicle' with user interfaces for:
- Actions (Create, Edit, Delete)
- Listing builder
- Entity settings pages
- Manage fields
- Manage form display
- Manage display
Drupal 8 has two type of entities, ContentEntity and ConfigEntity. Content entity is based on database table and config entity is based on Drupal config table.