コード例 #1
0
		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);
		}
コード例 #2
0
 public CarrierListViewModel(List<Carrier> carriers)
 {
     CarrierList = carriers;
     Carrier = new CarrierViewModel();
     Search = new SearchViewModel();
 }
コード例 #3
0
 public CarrierListViewModel(List <Carrier> carriers)
 {
     CarrierList = carriers;
     Carrier     = new CarrierViewModel();
     Search      = new SearchViewModel();
 }