Created
November 1, 2021 23:10
-
-
Save ShariqT/e6693d723998b74db30bfce61cb9fd2c to your computer and use it in GitHub Desktop.
Index.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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