views:

39

answers:

1

I'm using .net 4.0 (Visual Studio 2008). We are using WCF DataService, through this we are able to update the data. While calling UpdateObject(..) method its working fine and its been updated to database also( I manually checked the database). But while retrieving the data back, its not giving updated value??????

Example :

   _context.UpdateObject(employee);
   _context.SaveChanges();    

    retutn  _context.Employees.Where(e => e.Code == empCode).singleOrDefault();

how to solve this, what i missing?

A: 

Are you sure you are querying the same employee instance? If yes, the instance returned from the query and the instance passed to the UpdateObject method must be the same. Can you please make sure that's the case?

Thanks Pratik

Pratik Patel