示例#1
0
        private static void SeedPaymentMethods(params string[] values)
        {
            string methodValues = "";

            foreach (string value in values)
            {
                PaymentMethod newPaymentMethod = new PaymentMethod {
                    ["Method"] = { Value = value }
                };
                methodValues += $"({newPaymentMethod.FormatValues()}),\n";
                PaymentMethodCount++;
            }
            methodValues = methodValues.Remove(methodValues.Length - 2);
            string insertMethods =
                new Statement().Insert(new PaymentMethod()).Scope("Method").Values(methodValues, true).ToString();

            _sqlManager.Insert(insertMethods);
        }