-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
ClientImprovements or additions to the client codeImprovements or additions to the client code
Milestone
Description
If we use EF Core Lazy Loading Proxy in the client the entities will not be added to the DatasyncOperationsQueue.
services.AddDbContextFactory( ( b) => b .UseLazyLoadingProxies());
public class LocalDataContext : OfflineDbContext
if we change an entity the DatasyncOperationsQueue doesn't find it in the entity map because it tries to find the CLR type like "Castle.Proxies.EntityProxy", but it should search the Metadta type like Model.Entity.
You could fix it if you change the method
internal List GetChangedEntitiesInScope()
=> ChangeTracker.Entries()
.Where(e => e.State is EntityState.Added or EntityState.Modified or EntityState.Deleted)
.Where(e => this._entityMap.ContainsKey(e.Metadata.Name.AsNullableEmptyString()))
.ToList();
Metadata
Metadata
Assignees
Labels
ClientImprovements or additions to the client codeImprovements or additions to the client code