예제 #1
0
        public async Task <IActionResult> InsertGender([FromBody] InsertGenderViewModel model, ApiVersion apiVersion)
        {
            var(isSuccess, id) = await _service.InsertAsync(model);

            if (isSuccess)
            {
                return(CreatedAtAction(nameof(GetGender), new { id, version = apiVersion.ToString() }, id));
            }
            else
            {
                return(BadRequest());
            }
        }