I generally use Entity Framework for generating and interacting with my database. I recently got a few requirements that will require optimizing performance. As such, I was planning on using Dapper for this portion of the system.
One issue that I forsee is syncing changes to the database with the Dapper query strings. I wont get the compile time checks that I get with EF so I'm wondering how people navigate these issues? Is it just emphasis on tests or is there a way to work with Dapper such that database model checks can be performed at compile time?
There is not a built in way to check that the SQL you're writing matches the database schema, or that it's even syntactically correct SQL. If you want to catch that, then integration tests would probably be your best bet.