using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Threading.Tasks; using xModels.Base; namespace xModels.Interfaces { public interface IXBaseStore where T : XBaseStorableDto { // #region Retrieve ... /// /// Retrieve all Exists Items ... /// /// Task> GetAll (); /// /// Retrieve specific Item by key ... /// /// /// Task Get (TKey key); /// /// retrieve items based on specific condition ... /// /// /// Task> FindMany (Expression> condition); /// /// retrieve item based on specific condition ... /// /// /// Task FindOne (Expression> condition); #endregion // #region Add ... /// /// add specific item to Store ... /// /// /// Task Add (T item); /// /// Add a Collection of Items on Store ... /// /// /// Task AddMany (XBaseRangeRequest items); #endregion // #region Remove ... /// /// Remove an item from store ... /// /// /// Task Remove (T item); /// /// remove an item by it's Key ... /// /// /// Task RemoveByKey (TKey key); /// /// remove a collection of items at once ... /// /// /// Task RemoveMany(XBaseRangeRequest items); #endregion // #region Update ... /// /// Update Exists Item in store ... /// /// /// /// /// /// /// Task Update ( T item, ICollection propertyWhiteList = null, ICollection propertyBlackList = null, ICollection>> propertyValueProviders = null, bool updateWithNullOrEmptyValues = false ); /// /// Update a Collection of Exists Items ... /// /// /// /// /// /// /// Task UpdateMany ( XBaseRangeRequest items, ICollection propertyWhiteList = null, ICollection propertyBlackList = null, ICollection>> propertyValueProviders = null, bool updateWithNullOrEmptyValues = false ); #endregion // #region Exists ... /// /// retrieve item(s) exists based on specific condition ... /// /// /// Task IsExists (Expression> condition); /// /// is exists an item by providing it's key ... /// /// /// Task IsExistsByKey (TKey key); #endregion // #region Count ... /// /// Count Exists items ... /// /// Task Count (); #endregion } }