Changes(update) not commited to multiple columns using LINQ to SQL RRS feed

  • Question

  • i am trying the linq to sql query using button but the change does not commit.

    here is the code which i am using:

    using (Property_dbDataContext context = new Property_dbDataContext())
                var user = (from a in context.User_profiles
                            where a.user_id == Convert.ToInt32(Request.QueryString["user_id"])
                            select a).FirstOrDefault();
       = _Email.Text;
                user.first_name = _FirstName.Text;
                user.last_name = _LastName.Text;
       = _Phone.Text;
                user.cell = _Cell.Text;
                user.fax = _Fax.Text;
                user.address = _Address.Text;
                user.zip_code = _ZipCode.Text;
       = _Country.SelectedItem.Text;

    • Moved by CoolDadTx Monday, December 15, 2014 10:02 PM LINQ related
    Monday, December 15, 2014 7:07 PM


  • First what does the GetChangeSet indicate?

    Second do you have a PK on the "User_profiles"?  If not it will not create the background code to update or insert the data.

    Lloyd Sheen

    Monday, December 15, 2014 10:23 PM