/// <summary> /// Initializes a new instance of the <see cref="SuggestionModule" />. /// </summary> /// <param name="repository">The suggestion's repository</param> public SuggestionModule(IApplication application, ISuggestRepository repository) : base(application) { this._Repository = repository; // Define a route for urls "/members/{id}" which will returns the member matching the specified slug this.Get["/{id}"] = parameters => { return GetSuggestion(parameters.id); }; // Bind the HTTP GET verb to the ListMembers method this.Get["/suggestions"] = ListPublicSuggestions; }
public SuggestService(ISuggestRepository suggestRepository) { this._suggestRepository = suggestRepository; }
public SuggestService(ISuggestRepository repository, ILogger <SuggestService> logger = null) { _repository = repository; _logger = logger ?? new NullLogger <SuggestService>(); }
public SuggestController(ISuggestRepository suggestRepository, ISuggestService suggestService) { _suggestRepository = suggestRepository; _suggestServices = suggestService; }
public SuggestService(ISuggestRepository suggestRepository) { _suggestRepository = suggestRepository; }