示例#1
0
        public async Task <IActionResult> GetCategory([FromQuery] int id)
        {
            var result = await _showingService.GetForCategory(id);

            var res = _mapper.Map <IEnumerable <ProductModel> >(result);

            if (result != null)
            {
                return(Ok(res));
            }
            else
            {
                return(BadRequest(res));
            }
        }