public static void SeedDB(StairsAppContext ctx) { string password = "******"; byte[] passwordHash, passwordSalt; CreatePasswordHash(password, out passwordHash, out passwordSalt); User userMichal = new User { Username = "******", PasswordHash = passwordHash, PasswordSalt = passwordSalt, IsAdmin = true }; ctx.Users.Add(userMichal); ctx.SaveChanges(); }
public UserRepository(StairsAppContext ctx) { _ctx = ctx; }
public ProductRepository(StairsAppContext sac) { _stairsAppContext = sac; }