skip to Main Content

Javascript – aspnet form binding issue with nodatime and input local-datetime

I have binding issue between NodaTime and aspnet when using LocalDateTime Here is a sample razor pages app : Project.csproj <ItemGroup> <PackageReference Include="NodaTime" Version="3.1.12" /> <PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.2.0" /> </ItemGroup> Program.cs builder.Services.AddRazorPages() .AddJsonOptions(o => o.JsonSerializerOptions.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb)); Index.cs public class IndexModel :…

VIEW QUESTION

Postgresql – Can't cast database type timestamp without time zone to Instant

reservationLogs = await this.dbContext.ReservationLogs    .Where(r => r.ProcessedAt == null)    .Where(r => r.PropertyId == validPropertyId)    .OrderBy(r => r.CreatedAt).ThenBy(r => r.Operation)    .Take(200)    .ToListAsync(); some times with the same query i get the error ' Can't cast database type timestamp without time zone to Instant' note: CreatedAt nodaTime instane i am trying to find the exact reason

VIEW QUESTION
Back To Top
Search