File tree Expand file tree Collapse file tree
src/Microsoft.EntityFrameworkCore.UnitOfWork Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33using System ;
44using System . Linq ;
55using System . Threading . Tasks ;
6+ using Microsoft . EntityFrameworkCore . ChangeTracking ;
67
78namespace Microsoft . EntityFrameworkCore
89{
@@ -57,5 +58,12 @@ public interface IUnitOfWork : IDisposable
5758 /// <param name="parameters">The parameters.</param>
5859 /// <returns>An <see cref="IQueryable{T}"/> that contains elements that satisfy the condition specified by raw SQL.</returns>
5960 IQueryable < TEntity > FromSql < TEntity > ( string sql , params object [ ] parameters ) where TEntity : class ;
61+
62+ /// <summary>
63+ /// Uses TrakGrap Api to attach disconnected entities
64+ /// </summary>
65+ /// <param name="rootEntity"> Root entity</param>
66+ /// <param name="callback">Delegate to convert Object's State properities to Entities entry state.</param>
67+ void TrackGraph ( object rootEntity , Action < EntityEntryGraphNode > callback ) ;
6068 }
6169}
Original file line number Diff line number Diff line change 66using System . Linq ;
77using System . Text . RegularExpressions ;
88using System . Threading . Tasks ;
9+ using Microsoft . EntityFrameworkCore . ChangeTracking ;
910using Microsoft . EntityFrameworkCore . Metadata ;
1011using Microsoft . EntityFrameworkCore . Storage ;
1112
@@ -205,5 +206,10 @@ protected virtual void Dispose(bool disposing)
205206
206207 disposed = true ;
207208 }
209+
210+ public void TrackGraph ( object rootEntity , Action < EntityEntryGraphNode > callback )
211+ {
212+ _context . ChangeTracker . TrackGraph ( rootEntity , callback ) ;
213+ }
208214 }
209215}
You can’t perform that action at this time.
0 commit comments