// WingsEmu // // Developed by NosWings Team using System.Collections.Generic; using System.Threading.Tasks; namespace PhoenixLib.DAL { /// /// IGenericAsyncRepository permits to manage the data storage through async operations /// /// /// public interface IGenericAsyncRepository where TObject : class { /// /// Asynchronously returns all objects that are stored in data storage /// /// Task> GetAllAsync(); /// /// Returns object by its id in data storage /// /// /// Task GetByIdAsync(TObjectId id); /// /// Returns all objects with the given ids /// /// /// Task> GetByIdsAsync(IEnumerable ids); /// /// Asynchronously inserts or updates object parameter into data storage /// Parameter's id will be set in this method /// /// /// Task SaveAsync(TObject obj); /// /// Asynchronously inserts or updates objects given in parameter into data storage /// Parameter's id will be set in this method /// /// /// Task> SaveAsync(IReadOnlyList objs); /// /// Asynchronously delete the object from the data storage with the given id /// /// /// Task DeleteByIdAsync(TObjectId id); /// /// Asynchronously delete all the objects from the data storage with the given id /// /// /// Task DeleteByIdsAsync(IEnumerable ids); } }