public async Task <IActionResult> CreateOrganisationStandardValidation([FromBody] CreateEpaOrganisationStandardValidationRequest request)
        {
            try
            {
                _logger.LogInformation("Validation of creating new organisation standard");
                var result = await _mediator.Send(request);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                _logger.LogError($@"Bad request, Message: [{ex.Message}]");
                return(BadRequest(ex));
            }
        }
        public async Task <ValidationResponse> ValidateCreateOrganisationStandard(string organisationId, int standardCode, DateTime?effectiveFrom,
                                                                                  DateTime?effectiveTo, Guid?contactId, List <int> deliveryAreas)
        {
            var validationRequest = new CreateEpaOrganisationStandardValidationRequest
            {
                OrganisationId = organisationId,
                StandardCode   = standardCode,
                EffectiveFrom  = effectiveFrom?.Date,
                EffectiveTo    = effectiveTo?.Date,
                ContactId      = contactId.HasValue ? contactId.Value.ToString() : string.Empty,
                DeliveryAreas  = deliveryAreas
            };

            using (var request = new HttpRequestMessage(HttpMethod.Post, $"/api/ao/assessment-organisations/standards/validate-new/"))
            {
                return(await PostPutRequestWithResponse <CreateEpaOrganisationStandardValidationRequest, ValidationResponse>(request,
                                                                                                                             validationRequest));
            }
        }
 public async Task <ValidationResponse> CreateOrganisationStandardValidate(CreateEpaOrganisationStandardValidationRequest request)
 {
     return(await Post <CreateEpaOrganisationStandardValidationRequest, ValidationResponse>("api/ao/assessment-organisations/standards/validate-new", request));
 }