示例#1
0
        public IActionResult GetByType(int orderStatus)
        {
            if (!Enum.IsDefined(typeof(OrderStatus), orderStatus))
            {
                return(BadRequest($"Order status {orderStatus} is not defined."));
            }

            var userId = _userManager.GetUserIdAsInt(User);

            return(Ok(_orderAppService.GetByType((OrderStatus)orderStatus, userId)));
        }