Ejemplo n.º 1
0
        public IActionResult OnGet(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Samurai = repository.GetSamuraiById(id.Value);

            if (Samurai == null)
            {
                return(NotFound());
            }

            return(Page());
        }
Ejemplo n.º 2
0
 public IActionResult OnGet(int?id)
 {
     if (id.HasValue)
     {
         Samurai = repository.GetSamuraiById(id.Value);
         if (Samurai == null)
         {
             return(NotFound());
         }
     }
     else
     {
         Samurai = new Samurai();
     }
     Wepon = htmlHelper.GetEnumSelectList <Wepons>();
     return(Page());
 }