예제 #1
0
        public async Task <int> Handle(AddMerchantCommand request, CancellationToken cancellationToken)
        {
            ShopMerchant merchant = new ShopMerchant(request.MerchantId, request.ShopId, request.IsRegister);

            _repository.AddMerchant(merchant);

            return(await _repository.Save());
        }
예제 #2
0
        public ActionResult <ShopMerchant> GetShopMerchantByKey(Guid merchantId, Guid shopId)
        {
            ShopMerchant merchant = _query.getShopMerchantByKey(merchantId, shopId);

            return(Ok(merchant));
        }
예제 #3
0
 public void AddMerchant(ShopMerchant newMerchant)
 {
     _context.shopmerchant.Add(newMerchant);
 }