public int AddReceptionConditions(ReceptionConditions data)
        {
            var res = _context.ReceptionConditions.Add(data);

            _context.SaveChanges();
            return(res.Entity.Id);
        }
        public bool UpdateReceptionConditions(int id, ReceptionConditions data)
        {
            var res = _context.ReceptionConditions.FirstOrDefault(x => x.Id == id);

            if (res == null)
            {
                return(false);
            }
            res.placeWork = data.placeWork;
            _context.SaveChanges();
            return(true);
        }
        public IActionResult PutReceptionConditions(int id, [FromBody] ReceptionConditions data)
        {
            try
            {
                var res = _repository.UpdateReceptionConditions(id, data);

                if (!res)
                {
                    return(Conflict(409));
                }

                return(Ok(res));
            }
            catch (Exception error)
            {
                return(BadRequest(error));
            }
        }
        public IActionResult PostReceptionConditions(ReceptionConditions data)
        {
            try
            {
                var res = _repository.AddReceptionConditions(data);

                if (res == -1)
                {
                    return(Conflict(409));
                }

                return(Ok(res));
            }
            catch (Exception error)
            {
                return(BadRequest(error));
            }
        }