0

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.

DHN
  • 4,807
  • 3
  • 31
  • 45
sanchop22
  • 2,729
  • 12
  • 43
  • 66
  • You can implement repository pattern with _any_ version of _any_ ORM. Note however that `ObjectSet`s 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. – Gert Arnold Jan 15 '13 at 15:33
  • I am facing a problem with the implementation of repository pattern that is given at http://bizvise.com/2012/11/28/how-to-create-a-simple-data-access-layer-using-repository-pattern-with-entity-framework/ DatabaseContext is undefined and i couldn't understand what is that. – sanchop22 Jan 15 '13 at 15:48
  • Well, they create an `ObjectContext`-derived class named "DatabaseContext". – Gert Arnold Jan 15 '13 at 15:51

1 Answers1

1

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.

DHN
  • 4,807
  • 3
  • 31
  • 45