コード例 #1
0
        public ActionResult <Foto> GetFoto(Guid id)
        {
            var foto = _fotoService.Buscar(id);

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

            return(foto);
        }
コード例 #2
0
 public IActionResult Edit(Guid id)
 {
     try
     {
         if (!_session.Get <Cliente>("cliente").Login.Administrador)
         {
             return(RedirectToAction("VoltarAoSite"));
         }
     }
     catch
     {
         return(RedirectToAction("VoltarAoSite"));
     }
     return(View(_fotoService.Buscar(id)));
 }
コード例 #3
0
        public IActionResult Edit(Guid id)
        {
            try
            {
                if (_session.Get <Cliente>("cliente").Email != "*****@*****.**")
                {
                    return(RedirectToAction("VoltarAoSite"));
                }
            }
            catch
            {
                return(RedirectToAction("VoltarAoSite"));
            }

            return(View(_fotoService.Buscar(id)));
        }