title: Working with multiple resultset in .net core
body: <p>While retrieving the results using stored procedure how can I retrieve and store multiple result set in view model in .net core</p>
  
  <p>For e.g. from stored procedure I am returning records for below two queries</p>
  
  <pre><code>Select * LMS_Survey
  Select * from LMS_SurveyQuestion
  Select * from LMS_SurveyQuestionOptionChoice
  </code></pre>
  
  <p>and below is view model for two tables</p>
  
  <pre><code>public class LMS_SurveyTraineeViewModel
  {
      public LMS_SurveyDetailsViewModel SurveyDetailsViewModel { get; set; }
      public LMS_SurveyQuestionsViewModel SurveyQuestionsViewModel { get; set; }
      public LMS_SurveyQuestionOptionChoiceViewModel SurveyQuestionOptionChoiceViewModel { get; set; }
  }
  </code></pre>
  
  <p>This is how I am executing the stored procedure</p>
  
  <pre><code>public List&lt;LMS_SurveyTraineeViewModel&gt; GetTraineeSurvey(int surveyID)
          {
              try
              {
                  List&lt;LMS_SurveyTraineeViewModel&gt; modelList = new List&lt;LMS_SurveyTraineeViewModel&gt;();
  
                  modelList = dbcontext.Set&lt;LMS_SurveyTraineeViewModel&gt;().FromSql("LMSSP_GetTraineeSurvey @surveyID = {0},@LanguageID = {1}", surveyID, AppTenant.SelectedLanguageID).ToList();
  
                  return modelList;
              }
              catch (Exception ex)
              {
                  throw ex;
              }
          }
  </code></pre>
  
  <p>How can stored the multiple result set using stored procedure in view model ?</p>