private static async Task GetCustomers(string address) { IEntityServicesAsync <Customer> service = new RestApiCustomerService(new HttpClient() { BaseAddress = new Uri(address) }); var customer = await service.GetAsync(); }
private static async Task GetCustomersTest() { HttpClient client = new HttpClient(); client.BaseAddress = new Uri("https://localhost:5001"); ICustomerServiceAsync customerService = new RestApiCustomerService(client); IEnumerable <Customer> customers = await customerService.GetAsync(); foreach (var customer in customers) { Console.WriteLine(customer.FullName); } }