コード例 #1
0
 public async Task <IActionResult> Index(ShopViewModel shopViewModel)
 {
     if (await _shopRepository.UserHasShopAsync(User))
     {
         await _shopRepository.UpdateShopAsync(User, shopViewModel);
     }
     else
     {
         await _shopRepository.AddShopAsync(User, shopViewModel);
     }
     shopViewModel = _shopRepository.GetUserShop(User);
     return(View(shopViewModel));
 }