3 ms·
I advocate ORM use for guaranteed type-safety - so long as SQL queries are processed as strings inside your application there's always the risk of column names
by DaiPlusPlus 9y ago
I advocate ORM use for guaranteed type-safety - so long as SQL queries are processed as strings inside your application there's always the risk of column names and types not matching your entity classes - by using an ORM that generates SQL based on your classes (e.g. Entity Framework with Linq) it promotes mismatches to compile-time errors. This alone makes it worthwhile.
- weberc2 9y agoHow does an ORM know what your database schema is at compile time? Honest question.
- mikaelhardo 9y agoYou either generate a model based on your database, or generate your database from your model. That way the database and model are always in sync and you get errors in the code. In Entity Framework this is called either "Code first" or "Database first"