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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:14:46+00:00 2026-05-26T19:14:46+00:00

I am Using EF in My DAL. When I update a Record I have

  • 0

I am Using EF in My DAL. When I update a Record I have to Query the database using LINQ. This is Done in Performance Cost.

The Question is How to Update Records With out Round trip over all Database and also if I Have an Entity Created from Scratch and is not Attached to any object context how to Update its Values in Existing Entity in the database Without Querying.
Any Help Will be Appreciated.

  • 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-26T19:14:46+00:00Added an answer on May 26, 2026 at 7:14 pm

    Ok you can ad the record to datacontext like what i did in my code

    im going to just update VisitAmp field in my table

    NewBranchRequestTbl is my table
    nr is new record

    var newBran= new NewBranchDataContext();
        newBran.NewBranchRequestTbl.AddObject(nr);
                            newBran.ObjectStateManager.ChangeObjectState(nr, System.Data.EntityState.Unchanged);
        newBran.ObjectStateManager.GetObjectStateEntry(nr).SetModifiedProperty("VisitAmp");
    

    So when we call newBran.SaveChanges();

    it just updates VisitAmp in NewBranchRequestTbl

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

Sidebar

Related Questions

I have implemented a DAL using Rob Conery's spin on the repository pattern (from
I switched my DAL from using LINQ over to Entity Framework. Because my application
My DAL is created using Linq and all is fine. However, on one page,
We've just started using LINQ to SQL at work for our DAL & we
I am using this code to update my grid. It is not working. Grid
I am using Linq to SQL as my DAL layer and during unit test
I've created a DAL using the entity framwerok. I've also created a business service
I am using NHibernate with FluentNHibernate for my DAL. I am also using SchemaExport
I'm using Subsonic 2.2 Subcommander(Sonic.exe) to generate my DAL in a standalone class library
I'm using SubSonic 3 (ActiveRecord mode) to generate the code for my DAL. It

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.