Friday, March 16, 2012

Factory vs. Repository

A Factory seems to just be a class that returns some objects instantiated in code. I found this example while Googling: http://wiki.asp.net/page.aspx/310/factory/ ...A Repository, in contrast, is a class that returns some objects hydrated from a database or some other source beyond the bounds of strict C#. I've seen factories used to return collections of dummy objects to be used in testing.

No comments:

Post a Comment