Which ORM framework can best handle an MVCC database design?

前端 未结 6 922
北海茫月
北海茫月 2021-02-06 02:30

When designing a database to use MVCC (Multi-Version Concurrency Control), you create tables with either a boolean field like \"IsLatest\" or an integer \"VersionId\", and you n

6条回答
  •  生来不讨喜
    2021-02-06 03:15

    To the best of my knowledge, ORM frameworks are going to want to generate the CRUD code for you, so they would have to be explicitly designed to implement a MVCC option; I don't know of any that do so out of the box.

    From an Entity framework standpoint, CSLA doesn't implement persistence for you at all -- it just defines a "Data Adapter" interface that you use to implement whatever persistence you need. So you could set up code generation (CodeSmith, etc.) templates to auto-generate CRUD logic for your CSLA entities that go along with a MVCC database architecture.

    This approach would work with any entity framework, most likely, not just CSLA, but it would be a very "clean" implementation in CSLA.

提交回复
热议问题