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 6194531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:18:42+00:00 2026-05-24T03:18:42+00:00

How we can use Unit of Work pattern with (Entity Framework 4.1) code first

  • 0

How we can use Unit of Work pattern with (Entity Framework 4.1) code first approach?
As I know, EF 4.1 has internally implemented the Unit of Work and repository patterns. If we use self tracking and Data Transfer Objects pattern do we also need to implement a Unit Of Work pattern?

  • 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-24T03:18:42+00:00Added an answer on May 24, 2026 at 3:18 am

    If you use web services and stateless things, you need to track user entity state manually because DBContext should be disposable (the recommended usage). In other words, DBContext should be wrapped within a Using Block. The Unit of work pattern helps to reduce the dependency between Entity Framework and your infrastructure layer. This is ideal for stateless implementations like WCF services over DTO.

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

Sidebar

Related Questions

How should I use the unit of work pattern in the following scenario: I'm
I want to build a windosform application using Repository and Unit of Work pattern.
Currently in my application and using the unit of work pattern and generic repository,
Which built in (if any) tool can I use to determine the allocation unit
I'm sure most people who use the entity framework sometimes need an entity only
I have VS08sp1, Gallio 3.0.6.763 and TestDriven.NET 2.14. I use MBUnit framework for unit
I'm trying to learn more about Domain Driven Development including the Repository pattern, Unit
I'm using NHibernate, DI/IoC and the Unit of Work pattern. Most UoW examples I've
The goal: I'm trying to use the new Entity Framework 4.1 DbContext API (using
You can use more than one css class in an HTML tag in current

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.