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));
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        public async Task <JsonResult> Create([FromBody] CreateTenantDto input)
        {
            var output = await _tenantAppService.Create(input);

            return(Json(output));
        }