private void InformViewsForReleaseSeat(Flight flight, IEnumerable <long> releasedSeat)
        {
            var flightService = new FlightHubService();

            flightService.FlightSeatsOpened(releasedSeat.ToArray());
            flightService.FligthStatusChanged(flight.FlightId, (int)FlightStatusEnum.OnScedule);
        }
        public IHttpActionResult ChangeStatus(int?id, int?statusId)
        {
            if (!id.HasValue || !statusId.HasValue)
            {
                throw new HttpResponseException(HttpStatusCode.BadRequest);
            }

            var flightDb = flightRepository.GetSingleFlight(id ?? (int)InvalidPropertyValues.undefinedValue);

            if (flightDb == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            flightDb.ChangeFlightStatus(statusId ?? (int)InvalidPropertyValues.undefinedValue);

            unitOfWork.Complete();

            var flightService = new FlightHubService();

            flightService.FligthStatusChanged(id ?? (int)InvalidPropertyValues.undefinedValue, statusId ?? (int)InvalidPropertyValues.undefinedValue);

            return(Ok());
        }