public IActionResult Post([FromBody] SettingPost setting) { if (setting == null) { return(new BadRequestResult()); } int insertedId = settingRepository.AddNew(setting); if (insertedId > 0) { return(new OkObjectResult(insertedId)); } else { return(new BadRequestResult()); } }