Skip to content

Make sure we support IList<T>, not just array/List<T> #3082

Description

@roji
No description provided.

Activity

  1. added this to the 9.0.0 milestone on Feb 7, 2024
  2. self-assigned this
    on Feb 7, 2024
  3. sethzollinger commented on Jun 18, 2024

    @sethzollinger

    @roji, I just noticed this issue and even though I do not know what it is about exactly, I think it is in a similar area as my suggestion #2577.
    I understand however if this is completely out of scope. As a short summary:

    Although allowing IList would already solve my biggest issue with: CA1002: Do not expose generic lists.
    I am assuming the actually instantiated type would default to List. And could not be overriden / configured?

    My request was (at least conceptually) about allowing any list-type, like ObservableCollection.
    Or ImmutableList, which would require to loosen the required interface even further from IList to IReadOnlyList

    Of course "npgsql" can not support instantiating any list-type and types not implementing new(), new(int capacity), ICollection.Add, etc. - like ImmutableList - require special instantiation anyway.
    Preferably this could be configured through HasPostgresArrayConversion (with where TProperty : IReadOnlyList<TElementProperty>).
    Although of course this is already possible with INpgsqlArrayConverter and is a good enough solution.

    Thank you for your time.

  4. modified the milestones: 9.0.0, 10.0.0 on Oct 27, 2024
  5. added theissue type on Jun 14, 2025
  6. modified the milestones: 10.0.0, Backlog on Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions