public async Task <ActionResult> SeedConfiguration() { try { if (!await _paymentMethodService.IsExist(p => p.IsEnabled)) { var paymentMethods = new List <PaymentMethod>(); paymentMethods.Add(new PaymentMethod { MethodName = "Online Payment", IconName = "credit card.svg", HasPaymentGateway = true, IsEnabled = true }); paymentMethods.Add(new PaymentMethod { MethodName = "Cash on Delivery", IconName = "cash-on-delivery.svg", HasPaymentGateway = false, IsEnabled = true }); await _paymentMethodService.AddRange(paymentMethods); } if (!await _shippingMethodService.IsExist(p => p.IsEnabled)) { var paymentMethods = new List <ShippingMethod>(); paymentMethods.Add(new ShippingMethod { MethodName = "Courier", IconName = "delivered.svg", Cost = 100, IsOutSide = true, IsEnabled = true }); paymentMethods.Add(new ShippingMethod { MethodName = "Home Delivery", IconName = "delivery.svg", Cost = 30, IsOutSide = false, IsEnabled = true }); await _shippingMethodService.AddRange(paymentMethods); } return(Ok()); } catch (Exception exception) { return(BadRequest(exception.CreateErrorResponse())); } }