Simple factory to retrieve files using constructor dependency injection

Posted by mrblah on Stack Overflow See other posts from Stack Overflow or by mrblah
Published on 2009-12-17T19:50:25Z Indexed on 2010/05/18 5:50 UTC
Read the original article Hit count: 401

I want to create a class, that is flexible so I can switch implementations.

Problem: Store files/documents
Options: either store locally on the server filesystem, database or etc.

Can someone help with a skeleton structure of the class, and how I would call it?

I am not using an IoC, and don't really want to just yet. I just want the flexibility where I would make maybe 1 code change in the factory to call another implementation.

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc