Search code examples
asp.net-coreentity-framework-coreservice-layerdata-layers

Performance of DB queries in layered application


I’m building an ASPnetCore layered application which in turn will have a large DB. I’m using entity framework core and asynchronous calls to retrieve data from the db in database. These calls I’m awaiting. In the service layer I’m also using asynchronous calls to the data layer and await these. In the service layer I transform the data for api calls or razor pages using LINQ.

I’m wondering if this smart when considering performance, or would it be better to transform the data either in the db or in the data layer queries?


Solution

  • This is smart. If the data query performance is not really satisfactory, you can extract it separately. Sub-library and sub-table. In-memory database can be used for more frequent and large data volume business.