Our domain must deal with large volumes (possibly more than 1000 records) of objects as domain concepts. This is largely historical data that needs to be used by the domain business logic. Typically, this processing depends on the stored procedure or some other service to perform such work, but since it is completely related to the domain, and we want to preserve the fairness of the Model, we would like to find a solution that allows aggregating to manage all business logic and rules, necessary for working with data.
Essentially, we are talking about past transaction data. Our idea was to create an easy class and create an instance for each transaction that we need to work with from the database. This is inconvenient for us because of the volume of objects that we will create and potential performance, but it is also inconvenient for us to unload this domain logic into a stored procedure, since this will violate the consistency of our model.
Any ideas on how we can do this?
source share