Skip to content

Instantly share code, notes, and snippets.

@ShariqT
Created November 1, 2021 23:10
Show Gist options
  • Save ShariqT/e6693d723998b74db30bfce61cb9fd2c to your computer and use it in GitHub Desktop.
Save ShariqT/e6693d723998b74db30bfce61cb9fd2c to your computer and use it in GitHub Desktop.
Index.cshtml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using LobExampleApp;
namespace LobExampleApp.Pages
{
public class IndexModel : PageModel
{
private readonly ILogger<IndexModel> _logger;
public List<LobAddressResult> addressResults;
public IndexModel(ILogger<IndexModel> logger)
{
_logger = logger;
}
public async Task OnGet()
{
var api = new LobConnector();
var addresses = await api.listAddresses();
this.addressResults = addresses.data;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment