File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ public static class QueryHelpers
66{
77 public static async Task < SyncState > GetSyncState ( this IQueryable < CommitBase > commits )
88 {
9- var dict = await commits . GroupBy ( c => c . ClientId )
9+ var dict = await commits . AsNoTracking ( ) . GroupBy ( c => c . ClientId )
1010 . Select ( g => new { ClientId = g . Key , DateTime = g . Max ( c => c . HybridDateTime . DateTime ) } )
1111 . AsAsyncEnumerable ( ) //this is so the ticks are calculated server side instead of the db
1212 . ToDictionaryAsync ( c => c . ClientId , c => c . DateTime . ToUnixTimeMilliseconds ( ) ) ;
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ public IQueryable<T> GetCurrentObjects<T>() where T : class
194194 {
195195 if ( _crdtConfig . Value . EnableProjectedTables )
196196 {
197- return _dbContext . Set < T > ( ) ;
197+ return _dbContext . Set < T > ( ) . AsNoTracking ( ) ;
198198 }
199199 throw new NotSupportedException ( "GetCurrentObjects is not supported when not using projected tables" ) ;
200200 }
You can’t perform that action at this time.
0 commit comments