Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

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.