using System; using ACG6MvcAdHcApi.Models; using System.Collections.Generic; using System.Threading.Tasks; namespace ACG6MvcAdHcApi.BusinessLayer { /// <summary> /// Works like the Base interface for IProductBusinessLayer interface. /// **************************** Do not make changes to this interface **************************** /// ** Put your additional code in the IProductBusinessLayer interface under the BusinessLayer folder. ** /// ******************************************************************************************* /// </summary> public partial interface IProductBusinessLayer { /// <summary> /// Selects a record by primary key(s) /// </summary> public Task<Product> SelectByPrimaryKeyAsync(int productID); /// <summary> /// Gets the total number of records in the Products table /// </summary> public Task<int> GetRecordCountAsync(); /// <summary> /// Gets the total number of records in the Products table by SupplierID /// </summary> public Task<int> GetRecordCountBySupplierIDAsync(int? supplierID); /// <summary> /// Gets the total number of records in the Products table by CategoryID /// </summary> public Task<int> GetRecordCountByCategoryIDAsync(int? categoryID); /// <summary> /// Gets the total number of records in the Products table based on search parameters /// </summary> public 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 records as a collection (List) of Product sorted by the sortByExpression. /// </summary> public Task<List<Product>> SelectSkipAndTakeAsync(int rows, int startRowIndex, string sortByExpression); /// <summary> /// Selects records by SupplierID as a collection (List) of Product sorted by the sortByExpression starting from the startRowIndex /// </summary> public Task<List<Product>> SelectSkipAndTakeBySupplierIDAsync(int rows, int startRowIndex, string sortByExpression, int? supplierID); /// <summary> /// Selects records by CategoryID as a collection (List) of Product sorted by the sortByExpression starting from the startRowIndex /// </summary> public Task<List<Product>> SelectSkipAndTakeByCategoryIDAsync(int rows, int startRowIndex, string sortByExpression, int? categoryID); /// <summary> /// Selects records as a collection (List) of Product sorted by the sortByExpression starting from the startRowIndex, based on the search parameters /// </summary> public Task<List<Product>> SelectSkipAndTakeDynamicWhereAsync(int? productID, string productName, int? supplierID, int? categoryID, string quantityPerUnit, decimal? unitPrice, Int16? unitsInStock, Int16? unitsOnOrder, Int16? reorderLevel, bool? discontinued, int rows, int startRowIndex, string sortByExpression); /// <summary> /// Selects all records as a collection (List) of Product /// </summary> public Task<List<Product>> SelectAllAsync(); /// <summary> /// Selects all records as a collection (List) of Product sorted by the sort expression /// </summary> public Task<List<Product>> SelectAllAsync(string sortByExpression); /// <summary> /// Selects records based on the passed filters as a collection (List) of Product. /// </summary> public Task<List<Product>> SelectAllDynamicWhereAsync(int? productID, string productName, int? supplierID, int? categoryID, string quantityPerUnit, decimal? unitPrice, Int16? unitsInStock, Int16? unitsOnOrder, Int16? reorderLevel, bool? discontinued); /// <summary> /// Selects records based on the passed filters as a collection (List) of Product sorted by the sort expression. /// </summary> public Task<List<Product>> SelectAllDynamicWhereAsync(int? productID, string productName, int? supplierID, int? categoryID, string quantityPerUnit, decimal? unitPrice, Int16? unitsInStock, Int16? unitsOnOrder, Int16? reorderLevel, bool? discontinued, string sortByExpression); /// <summary> /// Selects ProductID and ProductName columns for use with a DropDownList web control, ComboBox, CheckedBoxList, ListView, ListBox, etc /// </summary> public Task<List<Product>> SelectProductDropDownListDataAsync(); /// <summary> /// Sorts the List<Product >by sort expression /// </summary> public Task<List<Product>> SortByExpressionAsync(List<Product> objProductsList, string sortExpression); /// <summary> /// Inserts a new record /// </summary> public Task<int> InsertAsync(Product objProduct); /// <summary> /// Updates a record /// </summary> public Task UpdateAsync(Product objProduct); /// <summary> /// Deletes a record based on primary key(s) /// </summary> public Task DeleteAsync(int productID); /// <summary> /// Deletes multiple records based on primary keys /// </summary> public Task DeleteMultipleAsync(List<Int32> productIDList); } }