[Info-vax] Calling $CREPRC in COBOL

Arne Vajhøj arne at vajhoej.dk
Mon Jul 11 20:53:46 EDT 2022


On 7/10/2022 11:12 PM, Richard Maher wrote:
> No, you invent LINQ so you can load all the data into Collections in 
> memory and forget about RELATIONAL data structures and SQL. Also must 
> forget that all RDBMS' have lovely query optimizers and Stored 
> Procedures for definer's rights execution.

That is not how LINQ to EF works.

Unless you materialize then everything is passed on to the database
in the SQL.

dbctx.T1.Where(o => o.F1 > 10)

becomes:

SELECT ... WHERE f1 > 10;

Only by calling ToList/ToArray/ToDictionary everything
gets pulled in, like:

dbctx.T1.ToList().Where(o => o.F1 > 10)

But in that case it is what the developer asked for.

> But I only want one column from that table. NO you must return all of 
> the class properties and forget about aggregate functions etc

An ORM is good for handling object-oriented data, but not good
for handling non-object-oriented data.

If your data model is objects then use ORM.

If your data model is just values in a column then
don't use ORM.

The right tool for the job.

Arne




More information about the Info-vax mailing list