Reputation: 1621
When trying to add new entity that contains date-Time attributes Like :
public DateTime CREATION_DATE { get; set; }
then exec add-migration command the migration file change the type from date/datetime to TimeStamp
Why This happen and how can I solve this issue ?
Upvotes: 0
Views: 434
Reputation: 89006
Every database provider has a default mapping of .NET types to database types. You can override this by decorating the entity property with a ColumnAttribute, or using the HasColumnType fluent property configuration.
Upvotes: 1