title: Procedure returning no value in data table using Entity Framework
body: <p>I want to use following stored procedure which contains pivot query</p>
  
  <pre><code>ALTER PROCEDURE YarnStockList
  AS
  BEGIN
      SELECT 
          YarnId,
          Receive,
          Issued,
          Claim,
          Total = Receive - Issued - Claim
      FROM
          (SELECT 
               YarnId, Status, Bags
           FROM 
               Yarn_IssueReceive) AS PivotData
      PIVOT
          (SUM(bags) FOR Status IN (Receive, Issued, Damage, Claim)
      END) AS Pivoting
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Ewmoa.png" rel="nofollow noreferrer">Output of procedure in sql</a>
  My class is</p>
  
  <pre><code>public class Yarn_IssueRecieve
  {
       public int Bags { get; set; }
  
      [MaxLength(20)]
      public string Status { get; set; }
  
      public int YarnId { get; set; }
  }
  </code></pre>
  
  <p>Using following code returns an empty result:</p>
  
  <pre><code>using (var db = new ATMSEntityModel())
  {
      var que = db.Database.SqlQuery&lt;Yarn_IssueRecieve&gt;("EXEC YarnStockList").ToList();
  
      gridControl1.DataSource = que.ToList();
  }
  </code></pre>
  
  <p>How can I execute this in Entity Framework to pass in data table with same columns in my procedure?</p>