// 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)); }
public UsersRepository(OefenfirmaContext c) { this.context = c; }
public AccountController() { db = new OefenfirmaContext(); usersRepository = new UsersRepository(db); }