Пример #1
0
        public async Task <IActionResult> Post([FromBody] UserMessageDto userMessage)
        {
            if (userMessage.Id != 0)
            {
                return(StatusCode(StatusCodes.Status400BadRequest, "Identity insert is not permitted."));
            }

            return(await SaveAndReturnEntityAsync(async() => await _userMessageService.SaveAndReturnEntityAsync(userMessage)));
        }