I'm trying to see if someone knows why am I getting this error: 

> 
> The data reader is incompatible with the specified
>  'model.getCoursesForCalendar\_Result'. A member of the type,
>  'edutaskid', does not have a corresponding column in the data reader
>  with the same name.
> 
> 
> 

I have a stored procedure that I'm adding to EF 6 and it has and If statement that returns different data, but on both ends of the If branches it returns the same quantity of columns, I've been googling and everyone seems to kind of agree with maybe the returned columns are not the same but in my case it doesn't apply, I also tried changing the column that I use as an Id to be not nullable, because the EF automatically puts it as Nullable, but still no luck, the weird part is that I commented almost all the code and left my stored procedure as simple as this:

```
 SELECT 1 AS edutaskid, 
                 '1' AS title, 
                 't' AS fromdate, 
                 't' AS thrudate 
                 FROM edutaskoffer

```

And still get the error, but if I leave it like this:

```
SELECT 1 AS edutaskid, 
                     '1' AS title, 
                     't' AS fromdate, 
                     't' AS thrudate 

```

I don't get the error, the only difference is that I'm not querying a table anymore and it only returns a row now, so I thought that maybe is row related, so I created a temp table with the same columns and inserted two rows and selected those rows and I do get the two rows:

```
DECLARE @CalendarCoursesTable TABLE
      (
         edutaskId INT NOT NULL,
         title     VARCHAR(150),
         fromdate  VARCHAR(150), 
         thrudate  VARCHAR(150)
      );

INSERT INTO @CalendarCoursesTable
          (edutaskId,
                 title,
                 fromdate,
                 thrudate)
          VALUES (1,'1','t','t');

          INSERT INTO @CalendarCoursesTable
          (edutaskId,
                 title,
                 fromdate,
                 thrudate)
          VALUES (2,'2','U','U');

          SELECT edutaskId,
                 title,
                 fromdate,
                 thrudate
          FROM @CalendarCoursesTable;

```

In the previous example I don't get the error, the only problem is when I use a table that I actually created on the database. I also followed what this link mentions: [The data reader is incompatible with the specified class](https://stackoverflow.com/questions/25553596/the-data-reader-is-incompatible-with-the-specified-class), but my column mapping is correct: [image](http://imageshack.com/a/img540/7835/yCCgjp.png)

anyone has and idea of what could be the problem?