Beispiel #1
0
 public IActionResult OnGet(int bikeId)
 {
     Bike = bikeData.GetById(bikeId);
     if (Bike == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Beispiel #2
0
 public IActionResult OnGet(int?bikeId)
 {
     Manufacturers = htmlHelper.GetEnumSelectList <Bike.BikeManufacturer>();
     if (bikeId.HasValue)
     {
         Bike = bikeData.GetById(bikeId.Value);
     }
     else
     {
         Bike = new Bike();
     }
     if (Bike == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }