Have read about "Repository pattern", before it, I have used pattern DAO (data-acess-object).

How should I implement table relations with this pattern? Should I create entity for links between tables?

Thank you!

  • This question come across as, I didn't read this article, can you read it for me? Consider rewriting your question with more context and some actual questions, i.e. Here is how i tried to implement this, but i can't figure out how to do X. As written no one will be able to help you without a lot of assumptions, or guessing. – esoterik May 25 '18 at 20:53

If you want a one-to-many relationship from a repository, write a class that embodies that relationship, and return it from one of your repository methods.

public class Person
    public int id;
    public string name;
    public List<Addresses> addresses

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.