Esempio n. 1
0
 // GET: Person
 public ActionResult Index()
 {
     using (DAL.ApplicationContext vrlContext = new DAL.ApplicationContext())
     {
         var vrlPersons = vrlContext.Persons.ToList();
         return View(vrlPersons);
     }
 }
Esempio n. 2
0
 // GET: Person
 public ActionResult Index()
 {
     using (DAL.ApplicationContext vrlContext = new DAL.ApplicationContext())
     {
         var vrlPersons = vrlContext.Persons.ToList();
         return(View(vrlPersons));
     }
 }
Esempio n. 3
0
 public TemplateModel()
 {
     if (HttpContext.Current.Request.IsAuthenticated)
     {
         var db     = new DAL.ApplicationContext();
         var userId = HttpContext.Current.User.Identity.GetUserId();
         var user   = db.Users.FirstOrDefault(u => u.Id == userId);
         user.PasswordHash  = null;
         user.SecurityStamp = null;
         this.User          = user;
     }
 }