title: How to convert ObjectResult into List object for stored procedure In MVC?
body: <p>I am new to MVC and working on Login Page validation, and having problem in controller for fetching login user data through a stored procedure with an <code>.edmx</code> file.</p>
  
  <p><code>PROC_LogIn_Info</code> is the name of the stored procedure.</p>
  
  <p>I get an error  :</p>
  
  <blockquote>
    <p>Cannot convert method group 'ToList' to non-delegate type 'System.Collections.Generic.List'. Did you intend to invoke the method?</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Login(tblUserMaintenance user)
  {
          if (ModelState.IsValid)
          {
              using (dbPA_MVCEntities objCon = new dbPA_MVCEntities())
              {                   
                  List&lt;Login&gt; LoginUser =  objCon.PROC_LogIn_Info("jhony", "a").ToList();
                  // showing Error here
  
              }
  
          }
          else
              ModelState.AddModelError("", "The user name or password provided is incorrect.");
  
  
          return RedirectToAction("LoginIndex", "Login");
  }
  </code></pre>
  
  <p>My model is <code>Login</code>:</p>
  
  <pre><code>public class Login
  {
      [Required]
      [DisplayName("User ID")]
      public string vUserID { get; set; }
  
      [DisplayName("User Name")]
      public string vUserName { get; set; }
  
      [DisplayName("User Email Id")]
      public string vUserEmail { get; set; }
  
      [DisplayName("Phone Number")]
      public string vPhoneNumber { get; set; }
  
      public string vRoleId { get; set; }
      public string IsActive { get; set; }
      public string chUserType { get; set; }
  
      [Required]
  
      [DisplayName("Password")]
      public string vPassword { get; set; }
  
      public List&lt;Login&gt; LoginUsersData { get; set; }
  }
  </code></pre>