简体   繁体   中英

Azure Mobile Services - UpdateAsync Does Not Update All Fields

I'm using Azure Mobile Services and am running into an issue with the "UpdateAsync" method. For many of the properties I am storing in my item the UpdateAsync method works just fine. For others the update is completely ignored. Has anyone ran into an issue like this before? The call I am making is nothing fancy and the code is below.

It seems that the issue of the property not being updated may be limited to properties that contain a number in the name. For example CP20M is one of my properties that is not updating through this method. Another property, "Weight" updates without issue. Both are doubles. Does that make any sense? The only way I have of updating these fields that seems to work is to delete the entry and insert a new entry. That will get the appropriate values into all properties.

Any ideas are appreciated.

public async Task UpdateUserProfileItemAsync(UserProfile userProfile)
{
    await _userProfileTable.UpdateAsync(userProfile);
    await SyncAsync();
}

Just rename the field you are having problem with. It worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM