// *********************************************************************** // Assembly : FCS.Lib // Author : FH // Created : 03-10-2015 // // Last Modified By : FH // Last Modified On : 2021-03-27 // *********************************************************************** // // Copyright © FCS 2015-2020 // // // *********************************************************************** using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Threading.Tasks; namespace FCS.Lib { /// /// Interface IRepositoryAsync /// /// The type of the t entity. public interface IAsyncReadonlyRepo where TEntity : class { /// /// Alls this instance. /// /// IQueryable<TEntity>. IQueryable All(); /// /// Alls the asynchronous. /// /// The predicate. /// Task<IList<TEntity>>. Task> AllAsync(Expression> predicate); /// /// Anies the asynchronous. /// /// The predicate. /// Task<System.Boolean>. Task AnyAsync(Expression> predicate); /// /// Finds the asynchronous. /// /// The predicate. /// Task<TEntity>. Task FindAsync(Expression> predicate); /// /// Firsts the asynchronous. /// /// The predicate. /// Task<TEntity>. Task FirstAsync(Expression> predicate); /// /// Firsts the or default asynchronous. /// /// The predicate. /// Task<TEntity>. Task FirstOrDefaultAsync(Expression> predicate); /// /// Anies the specified predicate. /// /// The predicate. /// true if XXXX, false otherwise. bool Any(Expression> predicate); /// /// Gets the by identifier. /// /// The identifier. /// TEntity. TEntity GetById(string id); } }