Reputation: 61
When i run update-database in nuget console then datetime2 error comes, but when migration file has DateTime type for Doj field. Please provide solution.
I deleted the migration file and then regenerate it by commend add-migration init and then update-database but not working and same error comes. Result : Database created but tables not, means connection string is working.
Upvotes: 0
Views: 184
Reputation: 61
finally problem solved,
Actually my sql server is old version and cannot have datetime2 type of datatype then i have to change type of insert data DOJ
then again i ran command
update-database
and table created successfully.
Upvotes: 0