Skip to content

BigQueryStruct with DateTimeOffset property gets misread by EF as a DateTime causing an exception. #20

Description

@retroandchill

As the title says creating a struct like this:

[BigQueryStruct]
public sealed class LastReport
{
    public DateTimeOffset Time { get; set; }

    public long Offset { get; set; }
}

leads to this error:

System.ArgumentException: Object of type 'System.DateTime' cannot be converted to type 'System.DateTimeOffset'.,

It seems like the underlying Dictionary containing the value contains a DateTime instead of DateTimeOffset for the value in question. I'm not sure if this is a config issue or something deeper with the library.

Activity

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions