User632428103 posted
Hello all,
imagine this scenario, i have a device when the user connect i call a web service and get some resutl
IEnumerable<someObject>
i insert all content into the database all works fine.
Now, we add in the back end some new object, modify, update, delete and so on ...
user make a log off, when user connect again i call again the web service and get the new IEnumerable<someObject>
I would like to know i can make a find the DIFFERENCE between these two objects ?
because i need to insert some news, and delete some old ...
I've try that, but that's work only if i have some new object IN the wsDatas
//a: get datas from db
var dbDatas = from db in xxx.SelectAll<someObject(true)
select new { db.ProfileCode, db.ProductCode, db.CategoryCode, db.OptionCode };
//b: get data from web service
var wsDatas = from ws in datas
select new { ws.ProfileCode, ws.ProductCode, ws.CategoryCode, ws.OptionCode };
// compare
var newDatas = wsDatas.Except(dbDatas);
of course, i can delete all datas and replace all but i would like to know how to find difference between two list of objects
thanks in advance