I am getting resource ID error. Please find below code
private async void GetAssetCount() { try { var userId = Preferences.Get("user_id", 1);
var status = await restService.GetMyAssetsByStatus(userId);
if (status.value.Count > 0)
{
App.Current.Dispatcher.BeginInvokeOnMainThread(() =>
{
lblMyAssetsCount = status.value[0].activeAssets;
lblTransferAssetsCount = status.value[0].sentByMe;
lblNotAcceptedAssetsCount = status.value[0].sentToMe;
});
}
else
{
await App.Current.MainPage.DisplayAlert("No internet", "Check your internet", "ok");
await Shell.Current.GoToAsync("//LoginPage");
}
}
catch (Exception e)
{
}
}