0
ajayak created
I want to detach a nested entity to avoid automatic db insertions. Here is sample code:
foreach (var refund in order.Refunds)
{
context.Entry(refund).State = EntityState.Detached;
}
How I get context in DomainServiceBase class?
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
2 Answer(s)
-
0
Fixed by injecting IDbContextProvider<DbContext> contextProvider
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks for the feedback @ajayak :)
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)