I have an SQL script file (that is, a file with a .sql
extension) and I want to execute it using PetaPoco in C#. Is that possible?
You can read the file and then execute the contents:
string sqlstmt = System.IO.File.ReadAllText(@"C:\Users\Public\something.sql");
db.Execute(sqlstmt);