Apfelsaft23
Apfelsaft23

Reputation: 326

Should I use one or several repository classes?

I am building an Android app with Room database. I use a repostory class, as suggested in this tutorial. Everything works fine - I only wonder if I should use on rep.class for each DAO or if I can use on big rep.class for all my data classes.

Upvotes: 3

Views: 1605

Answers (1)

brocky34
brocky34

Reputation: 178

I would suggest multiple repo classes...I don't see a big problem either way, but my fear would be that the code in a single large repo.class could quickly get difficult to maintain, especially if you have a large number of DAO's.

Upvotes: 2

Related Questions