i new ef , seem have become bit stuck following issue.. i have following situation. two applications using same database, , have both loaded context @ same time displaying same information. application 1 goes , deletes entity , updates database savechanges. application 2 goes , saves same modified entity. we using updategraph recurse through tree , save entities database context. however, when come saving deleted entity, doesn't exist in db context obtained database want add database. i have tried doing add, gives multiplicity error trying add full tree context! any ideas please? the following code snippet updategraph extension method. ( http://github.com/refactorthis/graphdiff ) private static void recursivegraphupdate<t>(dbcontext context, t datastoreentity, t updatingentity, updatemember member) t:class { if (member.iscollection) { // dealing collection var updatevalues = (ienumerable)member.accessor.getvalue...
Comments
Post a Comment