Why is the sample CustomerRepository a static class?

Feb 27, 2014 at 4:24 PM
Typically, I would use IOC and inject these custom/specific repositories into my app services or my mvc controllers. Why do you make your custom repo a static class with static only methods?

Any advantages?
Coordinator
Feb 27, 2014 at 5:16 PM

Because they are extension methods for IRepository.

Marked as answer by lelong37 on 3/31/2014 at 10:25 PM
Feb 28, 2014 at 5:30 PM
ah....can't believe I missed the "this" keyword on the params of the static method. That makes sense.

Thanks.
Coordinator
Feb 28, 2014 at 8:45 PM
:)