public IActionResult OnGet() { cityList = new SelectList(_cityService.FindAllCities(), nameof(City.Id), nameof(City.Name), null, null); categoryList = new SelectList(_parcelCategoryService.FindAllCategories(), nameof(ParcelCategory.Id), nameof(ParcelCategory.Name), null, null); string data = EnumHelper.GetStringValue(SizeEnum.Between25And40); var parcelDimensionList = Enum.GetValues(typeof(SizeEnum)).Cast <SizeEnum>() .Select(t => new ParcelInformation { Id = ((int)t), Name = EnumHelper.GetStringValue(t) });; heightList = new SelectList(parcelDimensionList, nameof(ParcelInformation.Id), nameof(ParcelInformation.Name), null, null); depthList = new SelectList(parcelDimensionList, nameof(ParcelInformation.Id), nameof(ParcelInformation.Name), null, null); breadthList = new SelectList(parcelDimensionList, nameof(ParcelInformation.Id), nameof(ParcelInformation.Name), null, null); var parcelInformationList = Enum.GetValues(typeof(WeightEnum)).Cast <WeightEnum>() .Select(t => new ParcelInformation { Id = ((int)t), Name = EnumHelper.GetStringValue(t) }); weightList = new SelectList(parcelInformationList, nameof(ParcelInformation.Id), nameof(ParcelInformation.Name), null, null); return(Page()); }
public IActionResult OnGet() { cityList = new SelectList(_cityService.FindAllCities(), nameof(City.Id), nameof(City.Name), null, null); categoryList = new SelectList(_parcelCategoryService.FindAllCategories(), nameof(ParcelCategory.Id), nameof(ParcelCategory.Name), null, null); return(Page()); }