public HomeController(IMovieService movieService, ISeriesService seriesService, IVideoGameService videoGameService, IBookService bookService, ICategoryService categoryService, IMainCategoryService mainCategoryService) { _movieService = movieService; _seriesService = seriesService; _videoGameService = videoGameService; _bookService = bookService; _categoryService = categoryService; _mainCategoryService = mainCategoryService; }
public FeedModule(IMovieService movieService, IVideoGameService videoGameService) { Get["/api/feed/{year}"] = _ => { int year; int page; // make sure a year is being passed in. if (!int.TryParse(Context.Parameters.year, out year)) return HttpStatusCode.BadRequest; if (!int.TryParse(Request.Query.page, out page)) page = 1; // remove this line when the line below has been commented. //var items = movieService.GetByYear(year); // below will create a list combined of data from the different services. var items = new List<Item>().Concat(movieService.GetByYear(year, page)).Concat(videoGameService.GetByYear(year, page)).ToList(); return Response.AsJson<IList<Item>>(items.Shuffle<Item>()); }; }
public VideoGameController(IVideoGameService service) { _service = service; }
public VideoGameController(IVideoGameService videoGameService, ICategoryService categoryService) { _videoGameService = videoGameService; _categoryService = categoryService; }
public VideoGameController(IVideoGameService videoGameService) { this._videoGameService = videoGameService; }