title: How to call stored procedure without error in ADO.NET Entity Framework?
body: <p>How do I  call a stored procedure without error in ADO.NET Entity Framework? If I use the code below, I get an error:</p>
  
  <pre><code>adminNameContext.AddItemCategory(12, "ggf", DateTime.Now);  
  </code></pre>
  
  <p><b>Error:</b></p>
  
  <p>The data reader is incompatible with the specified 'NetTanitimTestModel.Categories'. A member of the type, 'ID', does not have a corresponding column in the data reader with the same name.
  <strong></p>
  
  <pre><code>ALTER procedure [dbo].[sp_AddItemCategory]  
  (  
    @item int,   
    @category nvarchar(50),  
    @date smalldatetime   
  )  
  as  
  begin  
    if(@item=-1)  
    begin  
      insert into Categories(PARENTID,Category,Date) values(null,@category,@date)  
    end  
    else  
    begin  
      insert into Categories(PARENTID,Category,Date) values(@item,@category,@date)  
    end  
  end
  </code></pre>
  
  <p></strong></p>
  
  <p>i have Categories table which has got 3 columns: PARENTID,Category,Date</p>