コード例 #1
0
        public async Task <ActionResult <Receipt> > GetReceiptByDriverId(int id)
        {
            try
            {
                var result = await _repo.GetReceiptByDriverId(id);

                if (result == null)
                {
                    return(NotFound());
                }
                return(Ok(result));
            }
            catch (Exception e)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Database failure {e.Message}"));
            }
        }