public ActionResult RegisteredUserReport() { List <UserInfo> info = new List <UserInfo>(); UserRegdbEntities dataModel = new UserRegdbEntities(); info = dataModel.UserInfoes.OrderByDescending(i => i.Created_Date).ToList(); return(View(info)); }
public ActionResult RegistrationForm(UserInfo userInfo) { userInfo.Country = "United States"; userInfo.Created_Date = DateTime.Now; using (UserRegdbEntities dataModel = new UserRegdbEntities()) { dataModel.UserInfoes.Add(userInfo); dataModel.SaveChanges(); } return(RedirectToAction("Confirmation")); }