Skip to content

Interceptor System.InvalidCastException: Invalid cast from 'System.DateTime' to 'System.DateTimeOffset' #141

Open
@kachalkov

Description

System.InvalidCastException: Invalid cast from 'System.DateTime' to 'System.DateTimeOffset'.

at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)

at Dapper.RowFactory.GetValue[T](DbDataReader reader, Int32 fieldOffset) in /_/src/Dapper.AOT/RowFactory.cs:line 63

at Dapper.AOT.<Aec_Ppt_Service_DataAccess_generated>F9DBDBCB1F13C94DA6E339DF48F1A98215026BBECA8DE5F265C5ACAD26E3BC904__DapperGeneratedInterceptors.RowFactory1.Read(DbDataReader reader, ReadOnlySpan`1 tokens, Int32 columnOffset, Object state) in D:\source\Aec.Ppt.Service\Aec.Ppt.Service.DataAccess\obj\Debug\net8.0\Dapper.AOT.Analyzers\Dapper.CodeAnalysis.DapperInterceptorGenerator\Aec.Ppt.Service.DataAccess.generated.cs:line 369
A clear and concise description of what the bug is.

Where are you seeing this?

  • Dapper.AOT latest version?

Expected behavior
Code works without errors

Screenshots
N/A

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    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