4

So I'm extremely new to ASP.NET MVC and Interface design. I've been asking a lot of questions and reading a lot of articles trying to make sense of it all. Due to a crisis at work, I have been called upon to do my best and learn this environment. And although it's been frustrating to grasp, I am slowly getting it.

I have created an image in photoshop that shows my basic understanding of how the Repository Pattern works and why it's very much recommended. I'm trying to deploy this pattern at work and I want to make sure I get the major points alt text

I ask you to point out any glaring (not anal or unrelated) mistakes... I hope there aren't any.

1 Answer 1

4

This is pretty much the same pattern I follow. Its also similar to the pattern used by the nerddinner application written by Scott Hanselman.

The only change I would make is to add a service layer between your controller and repository. This will help you avoid having a "fat" controller which is considered bad practice.

Sign up to request clarification or add additional context in comments.

1 Comment

I couldn't agree more. I consider the ServiceLayer one of the most helpful patterns ever. Recommended Read: Martin Fowler's Patterns of Enterprise Application Architecture. The repository pattern is pretty much what NoSQL databases or LINQ-to-SQL gives you for free anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.