public async Task <int> Handle(AddGBRuleCommand request, CancellationToken cancellationToken) { GBRule gbRule = new GBRule(request.GBProductId, request.Content); _repository.AddGBRule(gbRule); return(await _repository.Save()); }
public ActionResult <GBRule> GetGBRuleByContentAndGBProductId(string content, Guid gbProductId) { GBRule gbRule = _query.getGBRuleByContentAndGBProductId(content, gbProductId); return(Ok(gbRule)); }
public void AddGBRule(GBRule newgbRule) { _context.gbrule.Add(newgbRule); }