title: Stored Procedure using Dapper in MVC 4
body: <p>I am trying to do CRUD operation in MVC using Dapper and stored procedure but I am not able to return result from model to controller due to conversion error which I am not able to solve. Please can anyone help what should I return as my result</p>
  
  <p>This is my controller</p>
  
  <pre><code> public ActionResult AllMobileList()
   {
       MobileMain MM = new MobileMain();
       return View(MM.AllMobileListing().ToList());
   }
  
   [HttpGet]
   public ActionResult Edit(string MobileID)   
   {
       MobileMain MM = new MobileMain();
       return View(MM.GetMobileList(MobileID));
   }
  </code></pre>
  
  <p>Model</p>
  
  <pre><code>public IEnumerable&lt;TBMobileDetails&gt; AllMobileListing()
  {
      var para = new DynamicParameters();
      para.Add("@Type", 1);
      var result= con.Execute("Sp_MVCDapper", para, commandType: CommandType.StoredProcedure).ToString();
  
      return result;  // Error happens here
  }
  
  public TBMobileDetails GetMobileList(string MobileId)
  {
      var para = new DynamicParameters();
      para.Add("@Type", 2);
      para.Add("@MobileId",Convert.ToInt32(MobileId));
      var result = con.Execute("Sp_MVCDapper", para, commandType: CommandType.StoredProcedure).ToString();
  
      return result;  // Error happens here
  }
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Cannot implicitly convert type 'string' to 'System.Collections.Generic.IEnumerable'</p>
  </blockquote>
  
  <p>I know its a very common error and I am doing some stupid mistake.</p>