Пример #1
0
        public IActionResult Delete(int id)
        {
            try
            {
                if (periodManager.Get(id) == null)
                {
                    return(NotFound(id));
                }

                periodManager.Delete(id);
            }
            catch (Exception ex)
            {
                logger.LogError($"Failed to delete period {id}: {ex}");
                return(BadRequest(config["Error:Default"]));
            }

            return(NoContent());
        }