How to handle huge efcore migrations designer files that is slowing down build and IDE

后端 未结 4 560
面向向阳花
面向向阳花 2021-02-01 23:52

I currently have an efcore 2.1 project with about 230 entities and about 350 migrations. Every time i add an efcore migration, a designer file is created. This file is approxima

4条回答
  •  既然无缘
    2021-02-02 00:04

    I think your question is a duplicate of Recommended way to clean old Entity Framework Core migrations and Entity Framework Core: Is it safe to delete Migration.Designer.cs if we will never Revert a migration?. The whole topic is discussed in various answers on these threads.

    I suggest to consider my answer in order to get your IDE snappy again and to reduce compilation time. And in the long run, it seems good practice to roll-up all migrations into one from time to time. If this is not urgent in your case, you might want to wait for this feature (planned for .NET 6) that allows you to do so in a simpler way.

提交回复
热议问题