namespace Repository; public class BankOperationRepository : RepositoryBase, IBankOperationRepository { public BankOperationRepository(RepositoryContext repositoryContext) :base(repositoryContext) { } public IQueryable GetAll() { return FindAll().OrderBy(x => x.DocDate); } public IQueryable GetAllConfirmed(Guid accountId, Guid businessId) { if (accountId == Guid.Empty) return FindByCondition(x => x.Status == "CONFIRMED"); return FindByCondition(x => x.Status == "CONFIRMED" && x.BankAccountId == accountId && x.BusinessId == businessId); } public IQueryable GetAllNew(Guid accountId, Guid businessId) { if(accountId == Guid.Empty) return FindByCondition(x => x.Status == "NEW"); return FindByCondition(x => x.Status == "NEW" && x.BankAccountId == accountId && x.BusinessId == businessId); } public IQueryable GetByBankAccountId(Guid bankAccountId) { return FindByCondition(x => x.BankAccountId == bankAccountId); } }