private async Task <ObservableCollection <EstoqueModel> > BuscarEstoque(string scdCodigo) { EstoqueLogic el = new EstoqueLogic(); string estoque = await el.GetEstoque(scdCodigo); ObservableCollection <EstoqueModel> retorno = JsonConvert.DeserializeObject <ObservableCollection <EstoqueModel> >(estoque); return(retorno); }
internal async Task BuscarProduto(string texto) { try { IsBusy = true; EstoqueLogic el = new EstoqueLogic(); string estoque = await el.GetEstoque(texto); ObservableCollection <EstoqueModel> retorno = JsonConvert.DeserializeObject <ObservableCollection <EstoqueModel> >(estoque); lstEstoque = retorno; } finally { IsBusy = false; } }