예제 #1
0
        public async Task <IActionResult> GetSaleById([FromRoute] int id)
        {
            var result = await saleService.GetByIdAsync(id);

            if (result == null)
            {
                return(BadRequest(new { Message = "The requested sale does not exist." }));
            }
            return(Ok(saleService.ConvertToDto(result)));
        }