开发者

WCF DataService Data Retrieve Issue

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?


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜