# Controller und Repository Calls

**URL:** <https://forum.shopware.com/t/controller-und-repository-calls/101163>\
**Category:** Programmierung\
**Created:** [6. September 2023 um 14:33 UTC](https://forum.shopware.com/t/controller-und-repository-calls/101163 "2023-09-06T14:33:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srcaft](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@Srcaft](https://forum.shopware.com/u/Srcaft)\
**Post date:** [6. September 2023 um 14:33 UTC](https://forum.shopware.com/t/controller-und-repository-calls/101163/1 "2023-09-06T14:33:48Z")

</div>

Hallo Zusammen,  
laut Shopware soll man keine Repository Calls innerhalb von Controllern benutzen:

> Do not use direct or indirect repository calls in a controller. Always use a store-api route to get or put datas

[Quelle](https://developer.shopware.com/docs/resources/guidelines/code/storefront-controller)  
Aber warum ist das so und wie funktioniert die Alternative über die store-api?

Viele Grüße
