Exemplo n.º 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());
        }
Exemplo n.º 2
0
        public ActionResult <ShopMerchant> GetShopMerchantByKey(Guid merchantId, Guid shopId)
        {
            ShopMerchant merchant = _query.getShopMerchantByKey(merchantId, shopId);

            return(Ok(merchant));
        }
Exemplo n.º 3
0
 public void AddMerchant(ShopMerchant newMerchant)
 {
     _context.shopmerchant.Add(newMerchant);
 }