Skip to content

RangeHandler should handle all the types of its subtype's handler #3563

@Arsync

Description

@Arsync

I'm using NodaTime by Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime (v5.0.1) and have model:

public class A
{
    public NpgsqlRange<OffsetDateTime> VersionPeriod { get; set; }
}

When tstzrange value [2020-12-09T14:34:02.675750+03:00,) is coming from database, it throws following exception:

Unable to cast object of type 'NpgsqlTypes.NpgsqlRange`1[NodaTime.Instant]'
to type 'NpgsqlTypes.NpgsqlRange`1[NodaTime.OffsetDateTime]'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions