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()); }
public ActionResult <ShopMerchant> GetShopMerchantByKey(Guid merchantId, Guid shopId) { ShopMerchant merchant = _query.getShopMerchantByKey(merchantId, shopId); return(Ok(merchant)); }
public void AddMerchant(ShopMerchant newMerchant) { _context.shopmerchant.Add(newMerchant); }