How to get custom entity data in custom page i have created Event entity, and I have custom page.

I want to load ALL Entity rows and then use it in my template.

This is the way everyone is prsenting, but i don't know how can i get NID value

$events = \Drupal::entityTypeManager()-&gt;getStorage('event')-&gt;load($nid);

Using Symfony i could do this like:

$events = $this-&gt;getDoctrine()-&gt;getRepository(Event::class)-&gt;findAll();
This is the solution

$storage = Drupal::entityTypeManager()-&gt;getStorage('event');

$nids = Drupal::entityQuery('event')-&gt;execute();
//Load all nids
$events = $storage-&gt;loadMultiple($nids);
//You can also use
$events = $storage-&gt;loadMultiple();