示例#1
0
        private static void SeedData(IApplicationBuilder app, Database context, IHashingProvider hashingProvider)
        {
            var salt = hashingProvider.GenerateSalt();
            var pass = hashingProvider.GenerateHash("Test", salt);


            context.Merchants.Add(new Merchant
            {
                Id           = 3,
                Name         = "Checkout",
                Username     = "******",
                PasswordSalt = salt,
                PasswordHash = pass,
            });
            context.SaveChanges();
        }