BetterFinds
Public Member Functions | Properties | Private Attributes | List of all members
BetterFinds.Pages.SearchModel Class Reference

Model for the Search page. More...

Inheritance diagram for BetterFinds.Pages.SearchModel:
Inheritance graph
[legend]
Collaboration diagram for BetterFinds.Pages.SearchModel:
Collaboration graph
[legend]

Public Member Functions

 SearchModel (IConfiguration configuration, IHubContext< NotificationHub > hubContext)
 Initializes a new instance of the SearchModel class. More...
 
IActionResult OnGet ()
 Shows the search results with sort and filter options. More...
 

Properties

string Query = "" [get, set]
 The query to search for. More...
 
string CurrentSort = "" [get, set]
 The current sort option. More...
 
int CurrentOccurring = 0 [get, set]
 The current occurring option. More...
 
List< Dictionary< string, object > > SearchResults = [] [get, set]
 The list of search results. More...
 

Private Attributes

readonly IConfiguration configuration
 The IConfiguration instance. More...
 
readonly IHubContext< NotificationHubhubContext
 The IHubContext instance. More...
 

Detailed Description

Model for the Search page.

Constructor & Destructor Documentation

◆ SearchModel()

BetterFinds.Pages.SearchModel.SearchModel ( IConfiguration  configuration,
IHubContext< NotificationHub hubContext 
)
inline

Initializes a new instance of the SearchModel class.

Parameters
configurationThe IConfiguration instance.
hubContextThe IHubContext instance.

Member Function Documentation

◆ OnGet()

IActionResult BetterFinds.Pages.SearchModel.OnGet ( )
inline

Shows the search results with sort and filter options.

This page gets the search results from the database and displays them by the specified sort order through a case insensitive query string inserted by the user. The search results are filtered by the query and can be filtered to show only auctions that are currently occurring or all auctions. To see available sort and filter options, see Utils.Auctions.GetAuctions.

Returns
A task that represents the action of loading the Search page.

Member Data Documentation

◆ configuration

readonly IConfiguration BetterFinds.Pages.SearchModel.configuration
private

The IConfiguration instance.

◆ hubContext

readonly IHubContext<NotificationHub> BetterFinds.Pages.SearchModel.hubContext
private

The IHubContext instance.

Property Documentation

◆ CurrentOccurring

int BetterFinds.Pages.SearchModel.CurrentOccurring = 0
getset

The current occurring option.

◆ CurrentSort

string BetterFinds.Pages.SearchModel.CurrentSort = ""
getset

The current sort option.

◆ Query

string BetterFinds.Pages.SearchModel.Query = ""
getset

The query to search for.

◆ SearchResults

List<Dictionary<string, object> > BetterFinds.Pages.SearchModel.SearchResults = []
getset

The list of search results.


The documentation for this class was generated from the following file: