HighwayFramework / Highway.Data

The fastest and smoothest way to great architecture
http://hwyfwk.com
MIT License
73 stars 30 forks source link

Add readonly interfaces and concretions to support enforceable readonly scenarios. #121

Closed ericburcham closed 2 years ago

ericburcham commented 3 years ago

The idea here is to make read-only versions of the primary interfaces and concretions in Highway.Data and Highway.Data.EntityFramework. The purpose of this is to provide safe operations for some common scenarios:

  1. Reading from a read-only copy to offload locks / etc... from a read/write transactional DB.
  2. Cached reads (in downstream types) that are by nature detached and should be read-only.

This first pull request exists for the purpose of getting myself familiar with all the moving pieces, and hashing out the concepts. I'd like to treat this as a POC, have some discussion here, and come back on another branch with proper TDD.

DevlinLiles commented 3 years ago

Overall, I like the approach, but still don't see a clean isolation of the repository and the unit of work ( writable structure ). I may be aiming for too much mentally on this.

DevlinLiles commented 3 years ago

@ericburcham @ericburcham-eprod I like the configuration based approach with declarative repositories.

ericburcham commented 2 years ago

While this PR has been useful in determining our final direction, it is cluttered with comments.

After discussion with both Devlin and Tim, I'm closing this pull request and will open another with the approach we have discussed.