public ActionResult <Foto> GetFoto(Guid id) { var foto = _fotoService.Buscar(id); if (foto == null) { return(NotFound()); } return(foto); }
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))); }
public IActionResult Edit(Guid id) { try { if (_session.Get <Cliente>("cliente").Email != "*****@*****.**") { return(RedirectToAction("VoltarAoSite")); } } catch { return(RedirectToAction("VoltarAoSite")); } return(View(_fotoService.Buscar(id))); }