title: The data reader has more than one field. Multiple fields are not valid for EDM primitive or enumeration types
body: <p>![enter image description here][1]I've got the latest Mysql connector that allows you to use the Visual Studio Entity Framework designer using asp.net webapi. and call the store procedure using below code</p>
  
  <pre><code> public static class Class1 
  {
      public static List&lt;T&gt; ExecuteStoredProcedure&lt;T&gt;(this DbContext dbContext, string storedProcedureName,List&lt;object&gt; parameters)
      {
          string storedProcedureCommand = "CALL " + storedProcedureName + "(";
  
          List&lt;object&gt; augmentedParameters = parameters.ToList();
  
          storedProcedureCommand = AddParametersToCommand(storedProcedureCommand, augmentedParameters);
  
          storedProcedureCommand += ");";
  
          return dbContext.Database.SqlQuery&lt;T&gt;(storedProcedureCommand).ToList&lt;T&gt;();
  
      }
  
      public static List&lt;T&gt; ExecuteStoredRecursiveProcedure&lt;T&gt;(this DbContext dbContext, string storedProcedureName, params object[] parameters)
      {
          string storedProcedureCommand = "SET max_sp_recursion_depth = " + maxRecursionCount + "; CALL " + storedProcedureName + "(";
  
          List&lt;object&gt; augmentedParameters = parameters.ToList();
  
          storedProcedureCommand = AddParametersToCommand(storedProcedureCommand, augmentedParameters);
  
          storedProcedureCommand += ");";
  
          return dbContext.Database.SqlQuery&lt;T&gt;(storedProcedureCommand).ToList&lt;T&gt;();
      }
  
      private static string AddParametersToCommand(string storedProcedureCommand, List&lt;object&gt; augmentedParameters)
      {
          for (int i = 0; i &lt; augmentedParameters.Count(); i++)
          {
              storedProcedureCommand = AddParameterToCommand(storedProcedureCommand, augmentedParameters, i);
          }
          return storedProcedureCommand;
      }
      private static string AddParameterToCommand(string storedProcedureCommand, List&lt;object&gt; augmentedParameters, int i)
      {
          if (augmentedParameters[i].GetType() == typeof(string))
          {
              storedProcedureCommand += "'";
          }
  
          storedProcedureCommand += (augmentedParameters[i].ToString());
  
          if (augmentedParameters[i].GetType() == typeof(string))
          {
              storedProcedureCommand += "'";
          }
  
          if (i &lt; augmentedParameters.Count - 1)
          {
              storedProcedureCommand += ",";
          }
  
          return storedProcedureCommand;
      }
  
      public static string maxRecursionCount { get; set; }
  }
  </code></pre>
  
  <p>Here i am calling the ExecuteStoredProcedure method with zero paramter but it's siplaying the above error "The data reader has more than one field. Multiple fields are not valid for EDM primitive or enumeration types."</p>
  
  <pre><code>  public List&lt;decimal&gt; Getcollection()
      {
       List&lt;object&gt; listobj=new List&lt;object&gt;();
           var x=  db.ExecuteStoredProcedure&lt;decimal&gt;("MangerModule",listobj);
  
           var list = x.ToList();
           return list;
          //collection collection = db.collections.Find(id);
          //if (collection == null)
          //{
          //    throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
          //}
  
          //return collection;
      }
  </code></pre>