Exemplo n.º 1
0
        public async Task <IHttpActionResult> Get()
        {
            try
            {
                var result = await _repo.GetAllCustomersAsync();

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

                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }