© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
4 replies
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'.
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'.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Passing DateOnly to controller
C#CC# / help
2y ago
✅ DateOnly.TryParse Vs DateOnly.TryParseExact use cases
C#CC# / help
11mo ago
How to set a 15 seconds timeonly type varible ?
C#CC# / help
4y ago
DateTime format into DateOnly
C#CC# / help
4y ago