Skip to content

2025 DatabaseAccess overhaul #4

Description

@feO2x

We're in 2025 and we should restructure the database access for the future:

  • remove non-async interfaces from DatabaseAccessAbstractions, eliminate Async prefix in remaining interfaces (I/O with third-party systems should always be async)
  • rename IReadOnlySession to IClient - even if callers do not want to explicitly call SaveChangesAsync, their might be data manipulation going on. This kind of humble object simply behaves like an HttpClient - there could be a transaction, there might be immediate data manipulation, we simply don't know that it is read-only. We will drop the IReadOnlySession interface altogether and simply rely on IAsyncDisposable.
  • Rename the namespace DatabaseAccessAbstractions to DataAccessAbstractions - when we have an IClient, we cannot be sure that we connect to a database.
  • Drop the interfaces IAsyncTransactionalSession and IAsyncTransaction.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions