| I used to love ORM, I used it everywhere. Writing another language in the language I am coding is wrong. ORM simplifies my programs. No, ORM does not simplify coding! It's a big complex adapter which does not fit many cases. RDBM itself is complex enough, let's put another complex abstraction above it so we can forget about the tables and columns and joins and foreign keys. Complexity added upon another complexity does not make a polished interface. If you want to use ORM, you have to learn both SQL and ORM with some depth at least. When problems occur, you have to debug both. 20 years in, I am still learning about RDBM. I still hate to compose SQL in code, but there is no better way. Databases are used in every situation. Want to store data? Database. Want to communicate between processes? Database. Want to store logs? Database. There are different solutions for different scenarios, but as long as the DB chugs along, why? Sometimes it's sickening. So 20 years in, the ROI of learning SQL is great. Please don't avoid learning about RDBM by using an ORM. Just learn it. Actually, I'm not without ORM now a days. Light-weight ORM like Dapper serves well, it does not abstract out the concepts of RDBM, but make things easier. |
That's not what's wrong. But rather writing in some language within a string literal is what feels wrong to you.
With better integration it'd be natural. The problem is, of course, there's no single SQL dialect.