public IHttpActionResult PostBusStopsOnLine(BusStopsOnLine busStopsOnLine)
        {
            if (!ModelState.IsValid || busStopsOnLine == null)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                unitOfWork.BusStopsOnLines.Add(busStopsOnLine);
                unitOfWork.Complete();
            }
            catch (DbUpdateException)
            {
                if (BusStopsOnLineExists(busStopsOnLine.Id))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = busStopsOnLine.Id }, busStopsOnLine));
        }
        public IHttpActionResult PutBusStopsOnLine(Guid id, BusStopsOnLine busStopsOnLine)
        {
            if (!ModelState.IsValid || busStopsOnLine == null)
            {
                return(BadRequest(ModelState));
            }

            if (id != busStopsOnLine.Id)
            {
                return(BadRequest());
            }

            try
            {
                unitOfWork.BusStopsOnLines.Update(busStopsOnLine);
                unitOfWork.Complete();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!BusStopsOnLineExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetBusStopsOnLine(Guid id)
        {
            BusStopsOnLine busStopsOnLine = unitOfWork.BusStopsOnLines.Get(id);

            if (busStopsOnLine == null)
            {
                return(NotFound());
            }

            return(Ok(busStopsOnLine));
        }
        public IHttpActionResult DeleteBusStopsOnLine(Guid id)
        {
            BusStopsOnLine busStopsOnLine = unitOfWork.BusStopsOnLines.Get(id);

            if (busStopsOnLine == null)
            {
                return(NotFound());
            }

            unitOfWork.BusStopsOnLines.Remove(busStopsOnLine);
            unitOfWork.Complete();

            return(Ok(busStopsOnLine));
        }