title: Return custom table from Stored Procedure In Ef Code First
body: <p>Is it possible to return custom table from SP . I'm using EF code first approach.</p>
  
  <p>This is my SP </p>
  
  <pre><code>CREATE PROCEDURE [dbo].[GetUserNotification]  
      @ToUserId INT
  AS
  BEGIN
  select  TU.FullName as ToUserName,
          FU.FullName as FromUserName, 
          N.NotificationClickType,
          N.TemplateId,
          J.Title as JobTitle,
          J.Identifier as JobIdentifier,
          B.Identifier as BidIdentifier
          from Notification N
          inner Join  AppUser TU on TU.Identifier = N.ToUserId
          inner Join  AppUser FU on FU.Identifier = N.FromuserId
          inner Join Bid B on B.Identifier = N.NotificationBidId
          inner Join Job J on J.Identifier = B.JobId
          where N.ToUserId=@ToUserId
          Order By N.Identifier DESC
  END
  </code></pre>
  
  <p>my Custom View Model</p>
  
  <pre><code>public class NotificationModel
      {
          public string ToUserName { get; set; }
  
          public string FromUserName { get; set; }
  
          public NotificationClickType NotificationClickType { get; set; }
  
          public int TemplateId { get; set; }
  
          public string JobTitle { get; set; }
  
          public int JobIdentifier { get; set; }
  
          public int BidIdentifier { get; set; }
      }
  </code></pre>
  
  <p>I have created same ViewModel. But every where I have seen Using SP i can return Only single table data which I have added in my DbContext class. </p>