using ACG6MvcAdHcApi.Models; using System; using System.Data; using System.Threading.Tasks; namespace ACG6MvcAdHcApi.DataRepository { /// <summary> /// Works like the Base interface for IProductRepository interface. /// **************************** Do not make changes to this interface **************************** /// ** Put your additional code in the IProductRepository interface under the DataRepository folder. ** /// *********************************************************************************************** /// </summary> public partial interface IProductRepository { /// <summary> /// Selects a record by primary key(s) /// </summary> internal Task<DataTable> SelectByPrimaryKeyAsync(int productID); /// <summary> /// Gets the total number of records in the Products table /// </summary> internal Task<int> GetRecordCountAsync(); /// <summary> /// Gets the total number of records in the Products table by SupplierID /// </summary> internal Task<int> GetRecordCountBySupplierIDAsync(int? supplierID); /// <summary> /// Gets the total number of records in the Products table by CategoryID /// </summary> internal Task<int> GetRecordCountByCategoryIDAsync(int? categoryID); /// <summary> /// Gets the total number of records in the Products table based on search parameters /// </summary> internal Task<int> GetRecordCountDynamicWhereAsync(int? productID, string productName, int? supplierID, int? categoryID, string quantityPerUnit, decimal? unitPrice, Int16? unitsInStock, Int16? unitsOnOrder, Int16? reorderLevel, bool? discontinued); /// <summary> /// Selects Products table records sorted by the sortByExpression and returns records from the startRowIndex with rows (# of rows) /// </summary> internal Task<DataTable> SelectSkipAndTakeAsync(string sortByExpression, int startRowIndex, int rows); /// <summary> /// Selects records by SupplierID as a collection (List) of Products sorted by the sortByExpression. /// </summary> internal Task<DataTable> SelectSkipAndTakeBySupplierIDAsync(string sortByExpression, int startRowIndex, int rows, int? supplierID); /// <summary> /// Selects records by CategoryID as a collection (List) of Products sorted by the sortByExpression. /// </summary> internal Task<DataTable> SelectSkipAndTakeByCategoryIDAsync(string sortByExpression, int startRowIndex, int rows, int? categoryID); /// <summary> /// Selects Products table records sorted by the sortByExpression and returns records from the startRowIndex with rows (# of records) based on search parameters /// </summary> internal Task<DataTable> SelectSkipAndTakeDynamicWhereAsync(int? productID, string productName, int? supplierID, int? categoryID, string quantityPerUnit, decimal? unitPrice, Int16? unitsInStock, Int16? unitsOnOrder, Int16? reorderLevel, bool? discontinued, string sortByExpression, int startRowIndex, int rows); /// <summary> /// Selects all Products /// </summary> internal Task<DataTable> SelectAllAsync(); /// <summary> /// Selects records based on the passed filters as a collection (List) of Products. /// </summary> internal Task<DataTable> SelectAllDynamicWhereAsync(int? productID, string productName, int? supplierID, int? categoryID, string quantityPerUnit, decimal? unitPrice, Int16? unitsInStock, Int16? unitsOnOrder, Int16? reorderLevel, bool? discontinued); /// <summary> /// Selects all Products by Suppliers, related to column SupplierID /// </summary> internal Task<DataTable> SelectProductCollectionBySupplierIDAsync(int supplierID); /// <summary> /// Selects all Products by Categories, related to column CategoryID /// </summary> internal Task<DataTable> SelectProductCollectionByCategoryIDAsync(int categoryID); /// <summary> /// Selects ProductID and ProductName columns for use with a DropDownList web control /// </summary> internal Task<DataTable> SelectProductDropDownListDataAsync(); /// <summary> /// Deletes a record based on primary key(s) /// </summary> internal Task DeleteAsync(int productID); /// <summary> /// Inserts a record /// </summary> internal Task<int> InsertAsync(Product objProduct); /// <summary> /// Updates a record /// </summary> internal Task UpdateAsync(Product objProduct); } }