Seed Codemaru Async 작업을 수행합니다.
79 {
80
81 var config = await tenantStore.
GetAsync(
"codemaru");
82 if (config != null && !config.Payment.IsEnabled)
83 {
84 config.Payment.IsEnabled = true;
85 config.Payment.IsTestMode = true;
86 config.Payment.TossClientKey = DemoClientKey;
87 config.Payment.TossSecretKeyEncrypted = keyProtector.
Protect(DemoSecretKey);
88 config.Payment.SuccessReturnUrl = string.Empty;
89 config.Payment.FailReturnUrl = string.Empty;
91 }
92
93
94 using var db = dbFactory.Create("codemaru");
95 if (db.Products.Any()) return;
96
97 db.Products.AddRange(
98 new Product
99 {
100 Name = "청양 햇고추",
101 Description = "국내산 청양 햇고추 500g. 매콤하고 신선한 고추를 직배송합니다.",
102 Price = 15_000m,
103 Stock = 100,
104 IsActive = true,
105 ImagePath = null
106 },
107 new Product
108 {
109 Name = "Dreamine MVVM FullKit",
110 Description = "WPF/MAUI 개발자를 위한 완성형 MVVM 프레임워크 라이선스. 소스코드 포함.",
111 Price = 59_000m,
112 Stock = 999,
113 IsActive = true,
114 ImagePath = null
115 },
116 new Product
117 {
118 Name = "개발자 머그컵",
119 Description = "코드마루 로고가 새겨진 도자기 머그컵 350ml.",
120 Price = 12_000m,
121 Stock = 50,
122 IsActive = true,
123 ImagePath = null
124 }
125 );
126 db.SaveChanges();
127 }
Task SaveAsync(ShopConfig config)
Task< ShopConfig?> GetAsync(string slug)
string Protect(string plainText)