public List <NoMatchStatsEntity> Adapt(DataTable dt) { List <NoMatchStatsEntity> results = new List <NoMatchStatsEntity>(); foreach (DataRow rw in dt.Rows) { NoMatchStatsEntity matchCode = new NoMatchStatsEntity(); matchCode = AdaptItem(rw); results.Add(matchCode); } return(results); }
public NoMatchStatsEntity AdaptItem(DataRow rw) { NoMatchStatsEntity result = new NoMatchStatsEntity(); if (rw.Table.Columns["ErrorDescription"] != null) { result.ErrorDescription = SafeHelper.GetSafestring(rw["ErrorDescription"]); } if (rw.Table.Columns["NbrRecords"] != null) { result.NbrRecords = SafeHelper.GetSafeint(rw["NbrRecords"]); } return(result); }