Where to put sql when using dapper?
问题 I'm using dapper for a mvc3 project at work, and I like it. However, how are you supposed to layer the application when using dapper? Currently I just have all my sql stuffed directly in the controller ( slap ) but I was thinking of making a class with static strings.. So I could do var reports = Dapper.Query<Report>(conn, MySql.ReportsRunningQuery) How do you store your sql when using dapper? 回答1: I would say put the sql where you would have put the equivalent LINQ query, or the sql for