public async Task <IActionResult> OnGet(Guid id) { Console.WriteLine($"You requested {id}"); Stream response = await _crmClient.GetStreamAsync($"contacts({id})"); if (response == null) { return(NotFound("Contact does not exist.")); } Contact = CRMClient.DeserializeObject <Client.Types.Contact>(response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { Stream response = await _crmClient.GetStreamAsync(Product.List()); if (response == null) { return(NotFound("Strangely no product is available.")); } OData <Product> wrapper = CRMClient.DeserializeObject <OData <Product> >(response); Products = wrapper.Value; return(Page()); }