public repository<T, TId>() as Repository<T, TId>:
Returns a cached typed KQL query root using the default mapping.
The compiler accepts repository<T>() and infers TId from the unique effective @Id property. The explicit repository<T, TId>() form is also supported and validates the exact mapped key type.
| Parameter | Description |
|---|---|
<T> | Entity type. |
<TId> | Effective identity type. |
Manager-owned query repository.
users = manager.repository<User>() explicitUsers = manager.repository<User, Int>()