示例#1
0
        public async Task <IActionResult> Get(int id = 0)
        {
            try
            {
                if (id != 0)
                {
                    return(Ok(_contaRepositorio.ObterPorId(id)));
                }

                return(Ok(_contaRepositorio.ObterTodos()));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.ToString()));
            }
        }