Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevStory | Review workings of UnitOfWork pattern #76

Open
1 task done
AnnaSasDev opened this issue Jan 2, 2025 · 0 comments
Open
1 task done

DevStory | Review workings of UnitOfWork pattern #76

AnnaSasDev opened this issue Jan 2, 2025 · 0 comments
Labels
dev story a dev story enhancement New feature or request

Comments

@AnnaSasDev
Copy link
Member

AnnaSasDev commented Jan 2, 2025

The Who - What - Why

As the Developer of InfiniLore
I want to change the UOW pattern to work with an attach - detach system towards repositories
So that we can have mulitple parallel unit of works per API connection

Additional Context

Currently one API connection means one unitofwork for the entire scope of the connection, which is "fine" but has some caviates. Currently if we wanted to have a MediatR Handler which does stuff in parallel to the db, this isn't possible, because one connection has only one DbContext. Concurrency "solves" this issue somewhat, but will still cause some roadblocks in the longrun.

Idea (pseudo):

class UnitOfWork(DbContextFacory fatory) {
    public void Attach(IRepo repo){}
    public void Detach(IRepo repo){}
}

and

class SomeRepo : IRepo {
    public static SomeRepo AsOneUnitOfWork() // Creates a unit of work through the dependency pipeline. maybe as a keyed service? Will have to think about this one further along
}

Dev-Side Criteria

No response

Ducky Acknowledgment

  • I accept that this issue might be delayed or reprioritized.
@AnnaSasDev AnnaSasDev added enhancement New feature or request dev story a dev story labels Jan 2, 2025
@github-project-automation github-project-automation bot moved this to Backlog in InfiniLore Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev story a dev story enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant