'.keeps showing me an exeption error message that my request data is null ,the return value is a list
This is the service that i use which gets data from firebase
public static async Task<IEnumerable<Specalist>> GetUser()
{
List<Specalist> lstUserInfo = (await firebaseClient
.Child($"Specalists/{PreferencesConfig.Id}").
OnceAsync<Specalist >()).Select(item => new Specalist
{
name= item.Object.name,
type= item.Object.type,
Passsword = item.Object.Passsword,
ID = item.Object.ID
}).ToList();
return lstUserInfo;
}
And this is the viewmodle :
private ObservableCollection<Specalist> _specalist = new ObservableCollection<Specalist>();
private ICommand _deletePatient;
public ObservableCollection<Specalist> Specalists { get => _specalist; set => SetProperty(ref _specalist, value, nameof(Specalists)); }
Specalists = new ObservableCollection<Specalist>((List<Specalist>)await SpecalistService.GetUser());
Exception occured while processing the request is what the error msg , how can i fix it!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
