示例#1
0
        public async Task <IActionResult> Post([FromBody] HospitalModel param)
        {
            AssignModelState();
            var result = await _hospitalService.Create(param);

            if (result.Success)
            {
                return(Ok(result.Item));
            }
            else
            {
                return(BadRequest(result.Message));
            }
        }
示例#2
0
        public async Task <ActionResult> Post([FromBody] CreateHospitalRequest request)
        {
            var response = await _hospitalService.Create(request);

            return(GetApiResponse(response));
        }