The data reader is incompatible with the specified . A member of the type, 'OrderID', does not have a corresponding column in the data reader with the same name.

6082
Views
1
Answers

I am calling a stored procedure using entity framework. I have a Entity as the return collection type. I get this error

    The data reader is incompatible with the specified 'Model.Entity'. A member of the type, 'column',
does
not have a corresponding column in the data reader with the same name.
edit | flag
Mad Maddy
Asked on: Jan 20, 2012 at 10:05PM

1 Answers

102
4
102

Try these steps to solve this issue

  1. If you have updated the stored Proc, You have to access your Model Browser Function, expand the EntityContainer, enter the Function Imports and click on Update button.
  2. Try using alias names like Products.CategoryID as CategoryId...
  3. Make sure that you have all the columns mapped in Entity for the stored proc returnes
edit | flag
Gokul A
Answered on: Jan 20, 2012 at 11:52PM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags