Exemplo n.º 1
0
        /// <summary>
        /// Searches for the Products in the Database
        /// </summary>
        /// <param name="param"></param>
        /// <returns>Returns a list of Products</returns>
        public List <Product> FindMatchingProducts(ProductQueryParams param)
        {
            if (param == null)
            {
                throw new ArgumentNullException(nameof(param));
            }

            if (param is NotebookQueryParams notebookParams)
            {
                return(NotebookSearchQueries.FindMatchingNotebooks(notebookParams, _db));
            }
            else
            {
                return(ProductSearchQueries.FindMatchingProduct(param, _db));
            }
        }
Exemplo n.º 2
0
 public List <Notebook> FindMatchingNotebook(NotebookQueryParams notebookParams)
 {
     return(GetNotebooks(NotebookSearchQueries.FindMatchingNotebooks(notebookParams, _db)));
 }