public ActionResult Index(string search) { using (var db = new SupenEntities()) { var repos = new AppUserRepos(); var searchedUser = repos.SearchUser(search); return(View(searchedUser)); } }
public ActionResult UpdateValues(string firstName, string lastName, int age) { using (var db = new SupenEntities()) { var getId = db.AppUser.Where(a => a.Email == System.Web.HttpContext.Current.User.Identity.Name).FirstOrDefault().AppUserId; var repos = new AppUserRepos(); repos.UpdateValues(firstName, lastName, age, getId); return(View()); } }
public ActionResult Create(AppUser user) { using (var db = new SupenEntities()) { var repos = new AppUserRepos(); var addUser = repos.AddUser(user.FirstName, user.LastName, user.Age, user.Email, user.Password); ViewBag.mess = "Success!"; } return(View(user)); }