AutoMapper.Collection.EFCoreHey, I'm having trouble saving a nested collection using AutoMapper.Collection.EFCore. Specifically when I try to add a new item to a list, I get the exception below.
InnerException: ' is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached.
var parent = await _context.Parents.Include(p => p.ChildrenArray).FirstAsync(p => p.Sub == request.Sub);
_mapper.Map(request, parent);
await _context.SaveChangesAsync();