C#C
C#3y ago
Kosta

❔ How to map dateonly and timeonly?

Getting this error when trying to do a migration:
The property 'UserData.CreatedDate' could not be mapped because it is of type 'DateOnly', which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.
Was this page helpful?