TransactionRepository.cs 554 B

123456789101112131415161718192021222324
  1. 
  2. namespace Repository;
  3. public class TransactionRepository : RepositoryBase<Transaction>, ITransactionRepository
  4. {
  5. public TransactionRepository(RepositoryContext repositoryContext)
  6. : base(repositoryContext)
  7. {
  8. }
  9. public IQueryable<Transaction> GetByAccountId(Guid bankAccountId, Guid businessId)
  10. {
  11. return FindByCondition(x => x.BankAccountId == bankAccountId && x.BusinessId == businessId);
  12. }
  13. public Transaction GetByOperationId(Guid operationId)
  14. {
  15. return FindByCondition(x => x.BankOperationId == operationId).FirstOrDefault();
  16. }
  17. }