OCPP.Core
OCPP.Core copied to clipboard
Eliminate database view for big performance improvement
Instead of using the view in the database, use a query directly. I kept he view object as a viewmodel, can change it later. Also this doesn't delete the view from the database, to delete that we can do a migration later.
This speeds the loading of the homepage up from 1700s to 100ms in my case. Depends on how large the Transactions table is.
We can also later shorten this query using automapper and ProjectTo instead of the long select.