Entity Framework Merge Nightmare

后端 未结 5 1690
说谎
说谎 2020-12-04 18:36

We\'ve adopted the Entity Framework and we\'re finding that when multiple people make isolated changes in their individual source control branches, there are massive conflic

5条回答
  •  自闭症患者
    2020-12-04 18:36

    As you said, one option is locking the file.

    Another possible option is to route all model changes through one individual on the team.

    Another option is to break the file apart into smaller files (like one per class), possibly leaving behind some designer support in the process.

    Another option is to create your own process, potentially using XSLT to transform the EDMX file, but I'm not sure exactly what this would look like, the designer.cs file is the massive difficult to merge one.

    Another option is to consider a different ORM.

    I'm not sure if they are doing anything to improve this in the next version of EF. Throwing that much data in a single file doesn't imply scalability of any kind (Yet LinqToSql does the same thing - In that case Damien Guard created some T4 templates to break the file apart, not sure if something similar exists for EF).

提交回复
热议问题