public IActionResult OnGet(int breweryId)
 {
     Brewery = breweriesService.GetBreweryById(breweryId);
     if (Brewery == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
        public IActionResult OnGet(int?breweryId)
        {
            Provinces = htmlHelper.GetEnumSelectList <Province>();

            if (breweryId.HasValue)
            {
                Brewery = breweriesService.GetBreweryById(breweryId.Value);
            }
            else
            {
                Brewery = new Brewery();
            }

            if (Brewery == null)
            {
                return(RedirectToPage("./NotFound"));
            }
            return(Page());
        }