public async Task <IActionResult> Add() { List <Manufacturer> manufacturers = await _manufacturers.GetManufacturersAsync(); AddModelViewModel model = new AddModelViewModel(); model.SetManufacturers(manufacturers); return(View(model)); }
public async Task <IActionResult> Index(int manufacturerId = 0) { // Construct the model and assign the selected manufacturer ListModelsViewModel model = new ListModelsViewModel(); model.ManufacturerId = manufacturerId; // Load the manufacturer list List <Manufacturer> manufacturers = await _manufacturers.GetManufacturersAsync(); model.SetManufacturers(manufacturers); return(View(model)); }
/// <summary> /// Return the available manufacturers /// </summary> /// <returns></returns> public async Task <List <Manufacturer> > GetManufacturersAsync() => await _manufacturers.GetManufacturersAsync();
public async Task <IActionResult> Index() { List <Manufacturer> manufacturers = await _client.GetManufacturersAsync(); return(View(manufacturers)); }