I could not find any exact information which platforms are suitable for repository pattern implementation. I have a MySQL DB and console app that is written in VS 2010. I am using Entity Framework 4 and my database is imported to VS project by model-first approach. Is this configuration suitable for implementing a repository pattern or do i have to use min. EF 5, VS 2012, also code-first approach, MSSQL or etc.? If my configuration is suitable for implementing repository pattern, would you suggest me an article to implement repository pattern.
1 Answer
Implementing a pattern is not related to a technical framework you might want to use. It's all about abstraction. So if you really do understand a pattern you can implement it. Well ok, you shouldn't try to implement e.g. the bridge pattern in assembler. ;o)
But if you are going to use a programming language with object oriented concepts like C#, VB, C++ or Java (I know, that there are a lot of other possibilities) you will achieve your goal.
ObjectSets of an an object context are basic repositories in their own right. So first ask yourself whether you need an abstraction layer on top of that.ObjectContext-derived class named "DatabaseContext".