public async Task <List <RestaurantsModel> > GetRestaurants() { RestaurantsBsn restaurantsBsn = new RestaurantsBsn(); var restaurants = await restaurantsBsn.Read(); return(restaurants); }
private void button1_Click(object sender, EventArgs e) { RestaurantsBsn restaurantsBsn = new RestaurantsBsn(); List <RestaurantsModel> restaurantsModels = restaurantsBsn.Read(); foreach (var l in restaurantsModels) { listView1.Items.Add(l.ToString()); } }