Example #1
0
        public int InsertRows(string table, List <dynamic> rows)
        {
            int dbResponse = 0;

            using (IServiceScope scope = ServiceProvider.CreateScope())
            {
                IDBConnection dbConnection = scope.ServiceProvider.GetRequiredService <IDBConnection>();
                dbConnection.Connect();
                string insertStatement = CreateInsertStatement(table, rows);
                dbResponse = dbConnection.ExecuteNonQuery(insertStatement);
            }
            return(dbResponse);
        }
Example #2
0
 public int ExecuteNonQuery(string cmdText, CommandType cmdType, SqlParameter param)
 {
     // TODO:  Add DBConnection.ExecuteNonQuery implementation
     return(con.ExecuteNonQuery(cmdText, cmdType, param));
 }