The data reader is incompatible with the specified 'CollegeModel.Employee'. A member of the type, 'EmpRole', does not have a corresponding column in the data reader with the same name.
I am used a single stored procedure to get all the columns inside Employee and also to get only 2 columns by passing Mode variable. in the above code i used mode 2 get two columns from Employee table where EmpRole & Salary skipped . Ok my Question is ,Is there any way to get only 2 parameters from stored procedure and Stored into new Employee model class list without making an additional class that is,any way to get data ino Employee model class list object without initialising all the variables inside the Employee model class. thanks..