Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6159961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:13:07+00:00 2026-05-23T21:13:07+00:00

After reading this Testability and Entity Framework 4.0 article about 75 times yesterday, it

  • 0

After reading this Testability and Entity Framework 4.0
article about 75 times yesterday, it is not clear to me what the author was trying to say. He seems to indicate that UoW and Repository patterns are two different patterns to use to solve similar problems. In other words, UoW was more for multi objects that need to be orchestrated prior to commit, whereas Repository is for more straightforward persistence.

When I do more searching online to find the holy grail framework to allow me to unit test my application, I see more articles that seem to imply that UoW is part of the Repository pattern, or vice versa.

Which interpretation is correct?

At the end of the day I want to be able to isolate my application enough to allow mocking of the data to in memory objects.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:13:07+00:00Added an answer on May 23, 2026 at 9:13 pm

    You can use them both separately or together.
    These posts that you cant use in memory objects – well – some would highly disagree without seeing a specific failing case.

    Repository pattern dictates generally loading information – and if you so choose – saving information.
    From MSDN: “Use a repository to separate the logic that retrieves the data and maps it to the entity model from the business logic that acts on the model. T”

    Load your data from your repository. Your unit of work pattern can surely encapsulate a transaction around all of your repository saves.

    There is no reason you cannot use one, the other, or both together.
    Now – testing your objects depends on WHAT you want to test. IF you are testing a save to a store – then sure – this isn’t a unit test. IF you want to mock your store and simply return an in memory object, then so be it. I think I’m missing why there is concern here from the other posters – call me blissfully ignorant.

    Your unit tests are supposed to test a ‘unit’ not some potential call your app may or may not make. You want to test for ex. a method – not a linq provider

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading this article on thedailywtf.com, I'm not sure that I really got the
After reading this article about validating with service layer I have some doubts. First:
After reading this discussion and this discussion about using CrashRpt to generate a crash
I got a little curious after reading this /. article over hijacking HTTPS cookies.
I've tried to do this several times with no luck. After reading this post
After reading this article on Herb Sutter's blog, I experimented a bit and ran
After reading this article I made a point that int () yields 0 because
After reading this article Storing C++ template function definitions in a .CPP file ,
After reading this article http://camendesign.com/code/developpeurs_sans_frontieres I have decided to follow what it says and
After reading this question , I was reminded of when I was taught Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.