public class Model
{
.
.
public DateOnly date { get; set; }
.
.
}
Exception Message:
Unable to cast object of type 'System.Int64' to type 'System.DateTime'.
StackTrace:
at ClickHouse.Client.Types.Date32Type.Write(ExtendedBinaryWriter writer, Object value)
at ClickHouse.Client.Copy.ClickHouseBulkCopy.SerializeBatch(Batch batch)
Model:
Exception Message:
Unable to cast object of type 'System.Int64' to type 'System.DateTime'.
StackTrace:
at ClickHouse.Client.Types.Date32Type.Write(ExtendedBinaryWriter writer, Object value) at ClickHouse.Client.Copy.ClickHouseBulkCopy.SerializeBatch(Batch batch)
Checked the Source Code:
https://github.com/DarkWanderer/ClickHouse.Client/blob/main/ClickHouse.Client/Types/Date32Type.cs
It Seems like we are Casting the value in DateTime without any backup plan.