I'm trying to get a better understanding of decoupling methods. Right now, I have this method:
private bool ContainsLegalFirstName(DataRow row, string legalFirstNameColumn)
{
return row.Table.Columns.Contains(legalFirstNameColumn)
&& !String.IsNullOrEmpty(row[legalFirstNameColumn].ToString());
}
I was thinking about changing the DataRow
to an IDataRecord
and adding an IListSource
parameter and passing in the DataTable
, but then the problem is I can't access the columns of the DataTable
from the IListSource
. Any suggestions or is what I have good enough?