예제 #1
0
        // GET: Home
        public ActionResult Index()
        {
            OefenfirmaContext c = new OefenfirmaContext();
            //List<Product> vmProducts = c.Products.ToList();
            List <Product> vmProducts = c.Products.Where(p => p.Spotlight == true).ToList();

            //Product product = db.Products.Include(p => p.Category).SingleOrDefault(e => e.ProductId == id);

            //Creating Hash Password for Users
            //List<User> users = c.Users.ToList();
            //foreach (var u in users)
            //{
            //    u.PasswordHash = FormsAuthentication.HashPasswordForStoringInConfigFile(u.UserPassword, "md5");

            //}
            //c.SaveChanges();

            return(View(vmProducts));
        }
예제 #2
0
 public UsersRepository(OefenfirmaContext c)
 {
     this.context = c;
 }
예제 #3
0
 public AccountController()
 {
     db = new OefenfirmaContext();
     usersRepository = new UsersRepository(db);
 }