Closed catinodeh closed 5 years ago
After receiving the object on my WebAPI (JsonPatchDocument address) I do the following operations:
var existingBilling = await _buss.GetById(billingid); address.ApplyTo(existingBilling); _buss.Update(existingBilling, userId);
In my business layer, all I do is set the udpateddate and user like this:
_repo.BillingAddresses.Attach(address); address.updatedby = userId; address.updateddate = DateTime.Now;
The problem here is that the property(ies) Applied are not changing their statuses to "Modified" and EntityFramework is assuming they are intact and not adding them to the Update call.
Anything I'm missing?
Michael
Seems like an EF issue... have a look at #90 for an approach that works.
After receiving the object on my WebAPI (JsonPatchDocument address) I do the following operations:
var existingBilling = await _buss.GetById(billingid); address.ApplyTo(existingBilling); _buss.Update(existingBilling, userId);
In my business layer, all I do is set the udpateddate and user like this:
The problem here is that the property(ies) Applied are not changing their statuses to "Modified" and EntityFramework is assuming they are intact and not adding them to the Update call.
Anything I'm missing?
Michael