We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I have a class with a NodaTime.ZonedDateTime Property like below.
public class Reservation { public ZonedDateTime BookedOnDate { get; set; } }
I am using Dapper Plus Bulk Merge to store data into postgres database like below.
public async Task UpdateReservationsAsync(IEnumerable<Reservation> reservations) { using (var connection = _connectionFactory.GetPostgresServerConnection()) { await connection.BulkActionAsync(x => x.BulkMerge(reservations)); } }
before that i am adding the support for above property like below in Startup.cs file
DapperPlusManager.AddCustomSupportedType(typeof(NodaTime.ZonedDateTime));
Running the code gives me the following exception. pgsql column data type is timestamptz
System.InvalidCastException: 'Can't write CLR type NodaTime.ZonedDateTime with handler type TimestampHandler'
Please note that it works fine for Bulk Insert but gives exception for Bulk Merge.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered:
Thank you for reporting,
We will look at it.
Sorry, something went wrong.
Hello @Jaanzaib ,
A new version has been released.
By developed made a few change to better support this kind of special type.
Could you try it and let us know if everything works correctly?
Best Regards,
Jon
JonathanMagnan
No branches or pull requests
Hi,
I have a class with a NodaTime.ZonedDateTime Property like below.
I am using Dapper Plus Bulk Merge to store data into postgres database like below.
before that i am adding the support for above property like below in Startup.cs file
DapperPlusManager.AddCustomSupportedType(typeof(NodaTime.ZonedDateTime));
Running the code gives me the following exception. pgsql column data type is timestamptz
System.InvalidCastException: 'Can't write CLR type NodaTime.ZonedDateTime with handler type TimestampHandler'
Please note that it works fine for Bulk Insert but gives exception for Bulk Merge.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: