title: Is this a leaky abstraction?
body: <p>Is specifying a field name on middle-tier a leaky abstraction?  </p>
  
  <p>I feel it is too cumbersome to create a separate function just for each field, even if it is code-generated.</p>
  
  <pre><code>        public bool Assortment_IsValueExistingOnOtherRecord(
              Dictionary&lt;string, object&gt; exceptPkColumns,
              string field, object value
              )
          {
              var c = Connect();
  
              var dt = new DataTable();
  
              string sanitizedField = field.Replace("'","");
  
              var daAssortment = new SqlDataAdapter(
                 string.Format(
  @"SELECT 1 FROM assortment
  WHERE 
  /* do I violate any good programming practice here? */ [{0}] = @value 
  AND NOT (assortment_id = @assortment_id)",  field), c);
  
              daAssortment.SelectCommand.Parameters.Add("assortment_id", exceptPkColumns["assortment_id"]);
              daAssortment.SelectCommand.Parameters.Add("value", value);
              daAssortment.Fill(dt);
  
              return dt.Rows.Count == 1;
          } 
  </code></pre>