Beispiel #1
0
        public static void SeedKeys(
            this PaymentGatewayDBContext ctx,
            string key)
        {
            if (ctx.ApiKeys.Any())
            {
                return;
            }

            ctx.Add(new ApiKey
            {
                ID  = 1,
                Key = key
            });

            ctx.SaveChanges();
        }
Beispiel #2
0
        public static void SeedPayments(
            this PaymentGatewayDBContext ctx,
            string identifier)
        {
            if (ctx.Payments.Any())
            {
                return;
            }

            ctx.Add(new Payment
            {
                ID = 1,
                PaymentIdentifier = identifier,
                CardHolderName    = "Igor",
                CardNumber        = "12345",
                CVV      = 12345,
                Amount   = 1.0M,
                Currency = "EUR"
            });

            ctx.SaveChanges();
        }