Files
SpacetimeDB/sdks
Ryan ad71f4ce96 [C#] Add support for IEnumerable<T> for Views' return types (#4486)
This is the implementation to resolve #4424 
# Description of Changes
* Add support for `IEnumerable<T>` as a valid C# View return type in
codegen, so view implementations can return query results without
forcing `ToList()`. The generator now detects `IEnumerable<T>`,
serializes it via the list serializer.
* Snapshots have been updated with a test to confirm that
`IEnumerable<T>` rather than checking it is unsupported (which we had
added when removing support during the transition away from `Query<T>`
usage.
* Refreshes docs/examples to reflect the new supported signature.

# API and ABI breaking changes
No breaking changes. This is additive support for an existing .NET
interface.

# Expected complexity level and risk
2 - Low

# Testing
- [X] Rebuilt CLI locally, ran regression tests, and `dotnet tests` in
C# module bindings.
- [X] Tested updated docs code snippets to ensure they resolve in an IDE
and publish.

---------

Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
2026-03-23 23:20:46 +00:00
..
2026-03-23 01:27:51 +00:00