Example #1
0
        public async Task <IActionResult> Create([FromBody] PackMaterialCreate request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var resultId = await _materialService.CreatePack(request);

            if (!resultId.IsSuccessed)
            {
                return(BadRequest(resultId));
            }
            return(Ok(resultId));
        }