public static RawMateRightTempEntity DataRowToEntity(DataRow row) { if (row == null) return null; var result = new RawMateRightTempEntity(); result.RoleId = (string)row["RoleId"]; result.RawMateId = (int)row["RawMateId"]; result.Flag = (string)row["RoleId"]; return result; }
public static RawMateRightTempEntity[] DataTableToEntitys(DataTable dt) { if (dt == null) return null; var results = new RawMateRightTempEntity[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { results[i] = RawMateRightTempService.DataRowToEntity(dt.Rows[i]); } return results; }