

namespace Repository;

public class TransactionRepository : RepositoryBase<Transaction>, ITransactionRepository
{
	public TransactionRepository(RepositoryContext repositoryContext)
		: base(repositoryContext)
	{

	}

	public IQueryable<Transaction> GetByAccountId(Guid bankAccountId, Guid businessId)
	{
		return FindByCondition(x => x.BankAccountId == bankAccountId && x.BusinessId == businessId);
	}

	public Transaction GetByOperationId(Guid operationId)
	{
		return FindByCondition(x => x.BankOperationId == operationId).FirstOrDefault();
	}
}

