public async Task<IActionResult> Index(SearchViewModel searchVM) { string searchString = searchVM == null ? null : searchVM.SearchString; var carriers = await _carrierRepository.GetCarriersAsync(searchString); var model = new CarrierListViewModel(carriers); return View("Index", model); }
public CarrierListViewModel(List<Carrier> carriers) { CarrierList = carriers; Carrier = new CarrierViewModel(); Search = new SearchViewModel(); }
public CarrierListViewModel(List <Carrier> carriers) { CarrierList = carriers; Carrier = new CarrierViewModel(); Search = new SearchViewModel(); }