コード例 #1
0
        public async Task <IActionResult> See(long id)
        {
            Producto result = await _service.GetById(id);

            if (result != null)
            {
                return(View(result));
            }
            return(RedirectToAction(nameof(Index)));
        }
コード例 #2
0
 public IActionResult Update(long?Id)
 {
     if (Id != null)
     {
         Producto result = _service.GetById(Id).Result;
         if (result != null)
         {
             return(View(result));
         }
     }
     return(RedirectToAction(nameof(Index)));
 }