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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:49:38+00:00 2026-06-06T18:49:38+00:00

MyDatatBaseDataContext MyDB = new MyDatatBaseDataContext(); var _Update = from u in MyDB.Employees where u.Address

  • 0
        MyDatatBaseDataContext MyDB = new MyDatatBaseDataContext();
        var _Update = from u in MyDB.Employees where u.Address == "WestSreet" select u;
        foreach (var item in _Update)
        {
            item.Address = "WS";
        }
        MyDB.SubmitChanges();
        var Select = from s in MyDB.Employees select s;
        grd_1.ItemsSource = Select;

With above code i can update the record and i able see the record modification in Original table data and DataGrid as well.The original table is updated successfully.

        MyDatatBaseDataContext MyDB = new MyDatatBaseDataContext();
        var _Udate_2 = MyDB.Employees.Where(u => (u.Address == "WestSreet"));
        foreach (var item in _Udate_2)
        {
            item.Address = "WS";
        }
        var Select = from s in MyDB.Employees select s;

        grd_1.ItemsSource = Select;

With above code i can update the record.I can see modification in DataGrid But i can’t see the record modification in Original table data.The original table is not updated.

  • 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-06-06T18:49:40+00:00Added an answer on June 6, 2026 at 6:49 pm

    You are missing a

      MyDB.SubmitChanges();
    

    On the second bit of code.

    It should be this:

        MyDatatBaseDataContext MyDB = new MyDatatBaseDataContext();
         var _Udate_2 = MyDB.Employees.Where(u => (u.Address == "WestSreet"));
        foreach (var item in _Udate_2)
        {
            item.Address = "WS";
        }
        MyDB.SubmitChanges();
        var Select = from s in MyDB.Employees select s;
    
        grd_1.ItemsSource = Select;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

MydatabaseDataContext MyDB = new MydatabaseDataContext(); Employee MyEmp = new Employee(); MyEmp.EmpID = 5039; MyEmp.EmpName
How do you expose a LINQ query as an ASMX web service? Usually, from
Following the directions from many articles, I've decided to implement the Unit of work
In my project I have my Linq To SQL dbml file, A Repository Layer
These two snippets do the same thing - is there one that's better than
I keep on receiving this error message. I followed the instructions but it seems
I'm experiencing an odd scenario and I'm looking for ways to figure out what's
I am using Linq 2 Sql in VS 2010, and I have the following
I am trying to run a linq query but I need the result as
This is my first crack at a method that is run periodically during the

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.