title: how to call model class in controller class
body: <p>mvc4</p>
  
  <p>this is my controller class in controller folder </p>
  
  <pre><code>public class UserController : Controller
  {
      //
      // GET: /User/
      private static Users _users = new Users();
      public ActionResult Index()
      {
          return View(_users._userList);
      }
  
      public ActionResult UserAdd()
      {
          return View();
      }
      [HttpPost]
      public ActionResult UserAdd(UserModels userModel)
      {
          _users.CreateUser(userModel);
          return View();
      }
  
  }
  </code></pre>
  
  <blockquote>
    <p>Error 2   The type or namespace name 'Users' could not be found </p>
    
    <p>Error 3   The type or namespace name 'UserModels' could not be found</p>
  </blockquote>
  
  <p>this is my user class in model folder</p>
  
  <pre><code> public class Users
      {
          public Users()
          {
              _userList.Add(new UserModels
              {
                  FirstName = "birbal ",
                  LastName = "kumar",
                  Address = "new delhi",
                  Email = "example@gmail.com",
                  DOB = Convert.ToDateTime("2/11/1991"),
                  salary = 8000
              });
           }
      }
  </code></pre>
  
  <p>this is my usermodel class in model folder</p>
  
  <pre><code>public class UserModels
  {
      [DisplayName("First Name")]
      [Required(ErrorMessage="First name is required")]
      public string FirstName { get; set; }
      [Required]
      public string LastName { get; set; }
      public string Address { get; set; }
      [Required()]
      [StringLength(50)]
      public string Email { get; set; }
      [DataType(DataType.Date)]
      public DateTime DOB { get; set;  }
      [Range(100,1000000)] 
      public decimal salary { get; set; }
  }
  </code></pre>
  
  <p>how to remove my errors</p>