public BusController(IBusRepository busRepository, IBusRouteRepository busRouteRepository, IMapper mapper, IWebHostEnvironment hostEnvironment) { this.busRepository = busRepository; this.busRouteRepository = busRouteRepository; this.mapper = mapper; this.hostEnvironment = hostEnvironment; }
public BusRouteQuery(IBusRouteRepository busRouteRepository) { Field <ListGraphType <BusRouteType> >("BusStops", //arguments for the current query. arguments: new QueryArguments(new QueryArgument <IntGraphType> { Name = "hour" }, new QueryArgument <IntGraphType> { Name = "minute" }), resolve: context => { var hour = context.GetArgument <int>("hour"); var minute = context.GetArgument <int>("minute"); return(busRouteRepository.GetRoutsForAllTheStops(hour, minute)); }); }
public BusRouteService(IBusRouteRepository repository) { Guard.ArgumentNotNull(repository, nameof(repository)); _repository = repository; }
public BusRouteType(IBusRouteRepository busRouteRepository) { Field(x => x.Name); Field(x => x.NextStop); Field(x => x.ForStop); }