if (dr.HasRows)
{
while (dr.Read())
{
list.Add(new VechicleMappingObject()
{
Map_VechicleCode = Convert.ToInt32(dr["IE_VECHICLE_CODE"].ToString()),
Uw_VechicleCode = Convert.ToInt32(dr["UW_VEHICLE_CODE"].ToString()),
Map_MakeCode = dr["VEHICLE_MAKE_CODE"].ToString(),
Map_ModelCode = dr["VEHICLE_MODEL_CODE"].ToString(),
Map_SubTypeCode = dr["VEHICLE_SUBTYPE_CODE"].ToString(),
ServiceName = dr["ServiceName"].ToString()
});
}
}
<pre lang="c#">
Map_VechicleCode = Convert.ToInt32(dr["IE_VECHICLE_CODE"].ToString()),
Uw_VechicleCode = Convert.ToInt32(dr["UW_VEHICLE_CODE"].ToString()),
please check these two column (["IE_VECHICLE_CODE"],["UW_VEHICLE_CODE"]) the value or values are not coming in integer format.