示例#1
0
        public async Task <BaseModel> CreateAsync([FromBody] CaseDTO model)
        {
            if (!TryValidateModel(model))
            {
                throw new Exception("400");
            }

            var id = await _caseService.CreateAsync(model);

            return(IdResponse(id));
        }
        public async Task <IActionResult> CreateCasesAsync([FromBody] CreateCaseModel caseTemplate)
        {
            await _service.CreateAsync(_mapper.Map <Case>(caseTemplate));

            return(Ok());
        }