Skip to content

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

@retroandchill

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions