I’m just getting started with Npgsql for .NET Core Entity Framework and I ran into some trouble trying to do an insert into a Postgres table with a
time data type. I initially tried to use a
DateTime object, as worked with the
date data type, but that didn’t work. The documentation said to use a
TimeSpan, but I didn’t know what to span. Here’s what I did to get it to work.