D
D
DODO_D2021-04-20 15:30:45
Software design
DODO_D, 2021-04-20 15:30:45

How to use multiple C# repositories and services?

Good afternoon everyone. I am writing an educational project using a three-layer architecture and DI. There was a question, I can not find an adequate answer to it on the network. The problem is this: I have 1 class in the DAL responsible for communicating with the base, as it should be, but I don’t understand how I can divide this class, for example, into several in order not to violate the single responsibility principle. That is, in one repository I have CRUD operations for the user, in the second one, and so on. I tried to create another class, an interface for it, throw it into the constructor on the right layers, but nothing happens. Please tell me how to organize it all.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question