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

  • SEARCH
  • Home
  • 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 121609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:59:52+00:00 2026-05-11T03:59:52+00:00

I want to write a business object layer in a way that makes each

  • 0

I want to write a business object layer in a way that makes each entity object responsible for saving its own changes.

I thought it would be a good way to have each entity posses its own ObjectContext, attach itself to that ObjectContext and perform the transaction whenever it needs to be saved.

In LINQ to SQL, DataContext is very lightweight and thus my solution doesn’t have too much memory consumption and performance loss. Is it the same with the ObjectContext?

And what about attaching objects? Is it a heavy unit of work like LINQ to SQL or not?

  • 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. 2026-05-11T03:59:53+00:00Added an answer on May 11, 2026 at 3:59 am

    It has been argued that objects shouldn’t be responsible for this; their job is to represent instantiated object; it is the job of another (repository) class to persist it.

    ObjectContext can be a pain when it comes to attaching/detaching objects, since (unlike LINQ-to-SQL) there is a much tighter coupling between the context and the entity. Personally, I wouldn’t use this approach; I’d use the entity itself (or a working copy) as a transient unit of work along with a short-lived context.

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

Sidebar

Related Questions

Hello I want write my own desktop sharing application in Java. The application should
I want to write a program in Prolog that confirms if a b-tree of
I have a data access layer that has separate classes for each table in
Let's say I have a business object that is very expensive to instantiate, and
I want to try and return an object from an XML reader that I
Possible Duplicate: Delete object and all its child objects in Entity Framework? This code:
I'm in a company that writes their own business data applications when there's no
I want write a simple query which will fetch data from a table (which
I want write a little code analyzer which parses nested structures and translates into
I want to write a batch script statement where: FINDSTR has to check for

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.