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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:42:26+00:00 2026-05-13T09:42:26+00:00

I have a standard update happening via linq to sql but the data does

  • 0

I have a standard update happening via linq to sql but the data does not persist to the database.

I am using an auto-generated class via the .dbml file designer.

The update statement is below:

public static void UpdateEmailsInWorkingTable(Guid emailGuid, string modifiedEmail)
{
        using (EmailDBDataContext DBContext = new EmailDBDataContext())
        {
            EmailAddress_Update EAUpdated = (from e in DBContext.EmailAddress_Updates
                                             where e.EmailGuid == emailGuid
                                             select e).SingleOrDefault();

            EAUpdated.EmailAddress = modifiedEmail;
            EAUpdated.IsValid = 'Y';
            EAUpdated.UpdateFlag = true;
            EAUpdated.LastChangedDtTm = DateTime.Now;
            try
            {
                DBContext.SubmitChanges(ConflictMode.FailOnFirstConflict);
            }
            catch (ChangeConflictException ex)
            {
                // do stuff here
            }
        } 
}

I looked through my auto-generated DataContext class and the only glaring difference is that the table in question EmailAddress_Update does not implement the two interfaces INotifyPropertyChanging and INotifyPropertyChanged that the other auto-generated entities do.

I am assuming that this is the cause of why the changes are not being persisted is it not???

To put it simply none of the Extensibility Method Definitions get generated for any part of this one class. If this is the cause of my problems, what in the database would be causing this to not auto-generate properly??

Thanks~

  • 1 1 Answer
  • 1 View
  • 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-13T09:42:26+00:00Added an answer on May 13, 2026 at 9:42 am

    I posted this question on MSDN as well here: MSDN Linq to Sql if you wanted to see the replies. But I found part of the reason why the code doesn’t generate.

    Here is a piece from my MSDN response:

    I created a small test table without a primary key and added it to the designer and sure enough it didn’t generate any of the Extensibility methods for that instance.

    So I then added a primary key to the same table and re-added it to the designer and sure enough all of the extensibility methods and change tracking events were generated.

    My question now is why must there be a primary key for this stuff to auto-generate?

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

Sidebar

Related Questions

The table I am working with does not have a standard auto-increment field to
I've heard they have standard GUI guideline, but I can't seem to find a
I have a standard code like below to validate xml against xsd, but it
I have a (very simple and standard) UPDATE statement which works fine either directly
I have a standard glut implementation. The display function redraws each object, but I
I'm using an NSFetchedResultsController in a standard way to update a UITableView whenever something
I have a standard form controller to update a google protocol buffers message object
Is there a way to have full standard Scala library documentation off-line? UPDATE: This
I have a standard web page with Ajax update panel. WorkFlow of the page
I have a standard HTML formatted table, that dynamically generates the content, via Zend

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.