Beispiel #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)));
        }
 public IActionResult Update(long?Id)
 {
     if (Id != null)
     {
         Producto result = _service.GetById(Id).Result;
         if (result != null)
         {
             return(View(result));
         }
     }
     return(RedirectToAction(nameof(Index)));
 }