- Published on
- Authors
- koskila
Fixing "An error occurred while updating the entries" while running code-first migrations in MVC 5 app
This post describes an issue with EF's code-first migrations, when mapping between DB's DateTime (datetime2) and C#'s DateTime simply fails, and results in the Update-Database cmdlet failing, too. It is more or less a prime example of a situation, where the error itself tells very little about the actual issue, and since debugging code-first migrations is kind of difficult ( see the best tips for that here! ), it's cumbersome to investigate.

















