예제 #1
0
        public async Task <IActionResult> Create([FromBody] SetModel model)
        {
            var Set = _mapper.Map <Set>(model);

            try
            {
                await _setService.Create(Set);

                return(Ok(Set));
            }
            catch (AppException ex)
            {
                return(BadRequest(new { message = ex.Message }));
            }
        }