0

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?

Lindstrøm
  • 396
  • 2
  • 16

1 Answers1

1

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.

u1986237
  • 78
  • 5
  • Just to clarify, your advise is to keep passing the data through the layers before transforming unless the performance decreases significantly? What about the awaiting? Is this necessary in all steps or only in the last? – Lindstrøm Nov 27 '20 at 23:25