示例#1
0
 public static int Execute(string query, object param = null)
 {
     using (var conn = DataBaseConfig.GetSqlConnection())
     {
         return(conn.Execute(query, param));
     }
 }
示例#2
0
 public static List <T> Query <T>(string query, object param = null)
 {
     using (var conn = DataBaseConfig.GetSqlConnection())
     {
         return(conn.Query <T>(query, param)?.ToList());
     }
 }