title: The best overloaded method match has some invalid Entity Framework
body: <pre><code>public JsonResult CreateNewMember(MembersModel m)
  {
      try
      {
          using (var db = new DbEntityDataModel())
          {
              ***var EmpAdd = db.tblMembers.Add(m);***  
              return Json(new { Result = "Error", Records = EmpAdd });
          }
      }
      catch (Exception EX)
      {
          return Json(new { Result = "Error", Message = EX });
      }
  }
  </code></pre>
  
  <p>I get this error while inserting into db. I have highlighted the part</p>
  
  <blockquote>
    <p>Cannot convert from 'Mvcapps.Models.MembersModel' to 'Mvcapps.Models.tblMember'   </p>
  </blockquote>
  
  <p>The other day I have written like this but it worked</p>
  
  <pre><code>public JsonResult CreateRecord(Person objperson)
  {
          try
          {
              using (var db = new VIVEK_ROOPASOFTEntities1())
              {
                  var addedPerson = db.Persons.Add(objperson);
                  db.SaveChanges();
                  return Json(new { Result = "OK", Records = addedPerson }, JsonRequestBehavior.AllowGet);
              }
  }
  
  public class MembersModel
  {
      public int Id { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public string Gender { get; set; }
      public string Mobile { get; set; }
      public string Email { get; set; }
      public string Pasword { get; set; }
      public string Country { get; set; }
      public string City { get; set; }
      public string PinCode { get; set; }
  }
  </code></pre>
  
  <p>Here is <code>tblMember</code></p>
  
  <pre><code>namespace Mvcapps.Models
  {
     using System;
     using System.Collections.Generic;
  
     public partial class tblMember
     {
         public int Id { get; set; }
         public string FirstName { get; set; }
         public string LastName { get; set; }
         public string Gender { get; set; }
         public string Mobile { get; set; }
         public string Email { get; set; }
         public string Pasword { get; set; }
         public string Country { get; set; }
         public string City { get; set; }
         public string PinCode { get; set; }
     }
  }
  </code></pre>