Exemple #1
0
        public async Task <IActionResult> GetByMaster([FromRoute] int id)
        {
            APIResult apiResult;

            #region 建立查詢物件
            DataRequest dataRequest = new DataRequest()
            {
                Skip   = 0,
                Take   = 0,
                Search = "",
                Sorted = null,
            };
            #endregion

            var records = await OrderItemService.GetByHeaderIDAsync(id, dataRequest);

            var result = mapper.Map <List <OrderItemDto> >(records.Result);
            apiResult = APIResultFactory.Build(true, StatusCodes.Status200OK,
                                               ErrorMessageEnum.None, payload: result);
            return(Ok(apiResult));
        }