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