dcolumbus
dcolumbus

Reputation: 9722

ASP.NET MVC & Repository Pattern Understanding

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.

Upvotes: 4

Views: 1432

Answers (1)

Conaire Creaney
Conaire Creaney

Reputation: 138

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.

Upvotes: 4

Related Questions