Пример #1
0
        public async Task <ActionResult> Post([FromBody] ReaderModel value)
        {
            try
            {
                await _readerService.AddAsync(value);
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }

            return(CreatedAtAction(nameof(Get), new { id = value.Id }, value));
        }