Beispiel #1
0
        public IActionResult Get()
        {
            var result = _repository.Get();

            if (result == null)
            {
                return(InternalServerError());
            }

            return(Ok(result));
        }
Beispiel #2
0
 public List <Patrimonio> Get(int marcaId)
 {
     try
     {
         using (PatrimonioRepository conexao = new PatrimonioRepository())
         {
             patrimonios = conexao.Get(marcaId);
             return(patrimonios);
         }
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
 public ActionResult <IEnumerable <PatrimonioViewModel> > Get()
 {
     return(Ok(_repository.Get()));
 }