SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to update an item in my external list i'm using BCS and LINQ to query. That's my Update method :

public static void Update(Customer customer, int parameter)
        {
            CustomersDataContext dataContext = new CustomersDataContext(CONNECTION_STRING);
            Customer oldCustomer = (from c in dataContext.Customers.AsEnumerable()
                                 where c.CustomerID == customer.CustomerID
                                 select c).Single();

            //oldCustomer.CustomerID = customer.CustomerID;
            oldCustomer.FirstName = customer.FirstName;
            oldCustomer.LastName = customer.LastName;
            oldCustomer.TwitterScreenName = customer.TwitterScreenName;
            oldCustomer.DateLastPurchase = customer.DateLastPurchase;
            oldCustomer.AmountLastPurchase = customer.AmountLastPurchase;

            dataContext.SubmitChanges();
        }

but nothing happens in my database PS: i'working on sharepoint 2010 and i created my entity using visual studio 2010

please help

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.