Skip to content

Commit fa8f475

Browse files
author
Daniel Matula
authored
doc: add dynamic referencing
Relates #165
1 parent cad5273 commit fa8f475

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/usage/advanced.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,13 @@ it is enough to set log level to the desired value.
9595
logging.basicConfig()
9696
root_logger = logging.getLogger()
9797
root_logger.setLevel(logging.DEBUG)
98+
99+
Dynamically referenced EntitySet
100+
------------------------------------------------
101+
102+
If you need to work with many Entity Sets the same way or if you just need to pick up the used Entity Set name in run-time, you may find out the ability to get an instance of Entity Set proxy dynamically. Here is an example of how you can print a count of all employees:
103+
104+
.. code-block:: python
105+
106+
count = getattr(northwind.entity_sets, 'Employees').get_entities().count().execute()
107+
print(count)

0 commit comments

Comments
 (0)