Comment on Abstraction boundaries are optimization boundariesparentComments−mrkeen1yYou just defined ORMs and made no comment on consistency. And Linq is what prompted me to write the comment.In this EF code, we're deducting an amount from some balance, not necessarily the highest balance: // Find the highest balance var maxAccount = await db.MyAccounts.OrderByDescending(x => x.Balance).FirstAsync(); ... // Deduct an amount maxAccount.Balance -= amount; Whereas in SQL, it will work.
Comments
You just defined ORMs and made no comment on consistency. And Linq is what prompted me to write the comment.
In this EF code, we're deducting an amount from some balance, not necessarily the highest balance:
Whereas in SQL, it will work.