public async Task <IActionResult> Post(TenantDto tenantDto) { try { await _tenantAppService.Create(tenantDto); return(Ok(new { Mensagem = "Tenant created successfully" })); } catch (Exception ex) { return(Conflict("Error in Tenant creation." + ex.Message)); } }
public async Task <JsonResult> MyCreate(CreateTenantDto input) { try { input.IsActive = true; var output = await _tenantAppService.Create(input); return(Json(new { result = "success", content = "记录修改成功" })); } catch (Exception ex) { throw new UserFriendlyException("表操作失败", ex.Message); } }
public async Task <JsonResult> Create([FromBody] CreateTenantDto input) { var output = await _tenantAppService.Create(input); return(Json(output)); }