Proper way to execute parameterized commands within a method This method allows for the execution of parameterized commands within a DAL class, and I tried to make it as reusable as possible. It works well but it feels a bit verbose to me. Is there a way to simplify this or is it good as is?

/// &lt;summary&gt;
/// Retrieves records from the specified data source.
/// &lt;/summary&gt;
/// &lt;param name="query"&gt;The command to be executed.&lt;/param&gt;
/// &lt;param name="dataSrc"&gt;The data source to use for the command.&lt;/param&gt;
/// &lt;param name="parameters"&gt;Optional parameters for a parameterized command.&lt;/param&gt;
/// &lt;returns&gt;A System.Data.DataTable containing the returned records.&lt;/returns&gt;
public static DataTable GetRecords(string query, DelConnection dataSrc, params SqlParameter[] parameters)
{
    if (query == "") throw new ArgumentException("No command provided.", "query");
    string conString = Dal.GetConnectionString(dataSrc);

    using (SqlConnection con = new SqlConnection(conString))
    using (SqlCommand cmd = new SqlCommand(query, con))
    {
        // Add parameters to command
        foreach (SqlParameter p in parameters)
        {
            cmd.Parameters.Add(p);
        }

        // Fill data table
        DataTable data = new DataTable();
        using (SqlDataAdapter adap = new SqlDataAdapter(cmd))
        {
            adap.Fill(data);
        }
        return data;
    }
}   //// End GetRecords()
Why is it static?

First off, I would remove the check for no parameters.  You've already checked that it is not null, if somebody passes in an empty list, the foreach for parameters will just be ignored.

As svick said, I would not return a null value if no results are found.  This complicates code on the calling side because you have to check for null before you work with it.  Same principle as the parameters.  If I have a foreach on an empty list, my code within the foreach would not be called.

I would change conString == "" to string.IsNullOrEmpty(constring)  I would do the same thing for query, because most people will pass an empty string before they pass a space string.  If you think space will be a problem, do both.

I would change this DataTable data = new DataTable(); to use var var data = new DataTable();  It makes the code easier to scan quickly.

If you insist on returning null for empty sets, change (data.Rows.Count &gt; 0) to (data.Rows.Any()).  I think it makes the code much easier to read because it says exactly what you are looking for.