lundi 18 février 2019

Design application with high database interaction and intermediate computations in .NET

Working on an service which hits database multiple times and does lots of computation that data in .net code and then saves it back to database tables.

there are certain columns which need to be computed from other DB columns from other tables(that information is also stored in database but we would cache that data).That information gives a sqlquery having all dependent column values for each calculated column.

The problem is I dont want to hit the database for each calculated column (it can go upto 300-400 calls in single operation.

What i can think of is get all the relevant data initially in sort of Model and the query from those model objects instead of sql tables.(Can Entity framework be used for this?)

But since there is dependency on sqlqueries as well that i mentioned above, i need to convert sql queries so that they can run on objects(converting sql query to linq)

Is there any API to convert sqlquery to linq? or any better standard design approach for this whole problem.

Aucun commentaire:

Enregistrer un commentaire