public async Task <ICommandResult> Handle(ProductGroupAddCommand message) { try { ProductGroup productGroup = new ProductGroup(); productGroup.Add(message); await _productGroupService.Add(productGroup); ICommandResult result = new CommandResult() { Message = "", ObjectId = productGroup.Id, Status = CommandResult.StatusEnum.Sucess }; return(result); } catch (Exception e) { e.Data["Param"] = message; ICommandResult result = new CommandResult() { Message = e.Message, Status = CommandResult.StatusEnum.Fail }; return(result); } }