Is UnitOfWork and GenericRepository Pattern redundant In EF 4.1 code first?

user9969 picture user9969 · Apr 23, 2011 · Viewed 9.2k times · Source

Wondering if I need to use the Genericrepository pattern and UnitOfWork to mock the repository.I am using MOQ.Is it now redundant since I have noticed that EF 4.1 has IDBSet.

I have not figured out how to write something generic that usic IDBSet .If you have an example where you implement IDBSet can you show it to me?

Any suggestions?

Answer

Ladislav Mrnka picture Ladislav Mrnka · Apr 23, 2011

This is duplicate of many topics already discussed on SO but I agree that some of them can be hard to find because they are nested in other question

I hope this will give you some answers. If not, don't hesitate to ask for more information either here or in a new question.