You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class A
{
public A()
{
Bs = new List<B>();
}
public ICollection<B> Bs { set; get; }
}
Sometimes I Want to update a graph:
var a = dbContext.As
.AsNoTracking()
.Include(x=>x.Bs)
.firstOrDefault();
var c = new C();
a.Bs.Add(c);
var d = new D();
var e1 = new E();
var e2 = new E();
d.Es.Add(e1); //<-- added new E
d.Es.Add(e2); //<-- added new E
a.Bs.Add(d);
I want to update a with its Bs(update C,D,E too) using graphdiff:
I have following entities in my
DbContext
:Sometimes I Want to update
a
graph:I want to update
a
with itsBs
(updateC
,D
,E
too) usinggraphdiff
:It updates
A
,B
s,C
s,D
s, but notE
s.So I think, I need to define a conditional mapping for
graphdiff
, to updateE
s too, somethings like:Is there any way to do this job?
The text was updated successfully, but these errors were encountered: