How to update particular record in azure mobile Service.
For Example I have a table in azure called country having two columns
- идентификатор_страны
- название_страны
Если я хочу обновить запись с country_id=5
из США в Соединенные Штаты Америки. Как это сделать.
//Global Variable
private MobileServiceCollection<country, country> items;
private IMobileServiceTable<country> todoTable = App.MobileService.GetTable<country>();
class country
{
public string id { get; set; }
public string country_name { get; set; }
public int country_id { get; set; }
}
private async void btnUpdate_Click(object sender, RoutedEventArgs e)
{
var change = await todoTable
.Where(todoItem => todoItem.country_name == tboxcName.Text)
.ToListAsync();
await todoTable.UpdateAsync(change);
}
Приведенный выше код я попробовал из этого сообщения, но не обнаружил .