Breeze / breeze.server.net

Breeze support for .NET servers
MIT License
76 stars 62 forks source link

Update modified fields only #80

Closed t-denis closed 2 years ago

t-denis commented 5 years ago

Hi, just found your awesome library. Thanks for great work.

Is it a bug or by design, that Breeze updates the entire db row, not just the modified fields? Since it roundtrips original values, I suppose that the partial update scenario should be supported. But it sets modified state for the entire EntityEntry, that leads to the entire row update,

Using ASP.Net Core 2.2 + EF Core 2.2.

ganySA commented 5 years ago

@t-denis did you manage to get the .expand() functionality to work?

t-denis commented 5 years ago

Not used expand() functionality. My issue was related to marking whole entity as modified rather then marking specific properties as dirty (like RIA Services does, I believe). https://github.com/Breeze/breeze.server.net/blob/c05cb2f8feb6e2aa2afed4c1dcaf957bfa3f0d88/AspNetCore/Breeze.Persistence.EFCore/EFPersistenceManager.cs#L301

dean-shanghai commented 5 years ago

@t-denis have you found the solution yet?

t-denis commented 5 years ago

@dean-yang The solution is well-known, mark properties as dirty instead of marking an entity, but I haven't created a PR.