public async Task <IActionResult> Execute(JObject jObj, string subject, string commonId) { if (jObj == null) { throw new ArgumentNullException(nameof(jObj)); } if (string.IsNullOrWhiteSpace(subject)) { throw new ArgumentNullException(nameof(subject)); } var command = _requestBuilder.GetClientService(jObj); command.CreateDateTime = DateTime.UtcNow; command.UpdateDateTime = DateTime.UtcNow; command.Id = Guid.NewGuid().ToString(); command.CommonId = commonId; command.Subject = subject; var validationResult = await _validator.Validate(command); if (!validationResult.IsValid) { var error = _responseBuilder.GetError(ErrorCodes.Request, validationResult.Message); return(_controllerHelper.BuildResponse(HttpStatusCode.BadRequest, error)); } _commandSender.Send(command); var obj = new { id = command.Id }; return(new OkObjectResult(obj)); }