public ActionResult ViewAllUsers() { List <UserDAL.user> dal = repo.ViewAll(); List <Models.user> mvc = new List <Models.user>(); foreach (var u in dal) { Models.user temp = new Models.user(); temp.userId = u.userId; temp.userName = u.userName; temp.Email = u.Email; temp.Phone = u.Phone; temp.Password = u.Password; mvc.Add(temp); } return(View(mvc)); }